Handle job aliases in AggregateConstituents
Aggregate constituents are derivations. However there can be multiple builds in an evaluation that have the same derivation, i.e. they can alias each other (e.g. "emacs", "emacs24" and "emacs24Packages.emacs" in Nixpkgs). Previously we picked a build arbitrarily for the AggregateConstituents table. Now we pick the one with the shortest name (e.g. "emacs").
This commit is contained in:
@ -433,7 +433,7 @@ sub checkBuild {
|
||||
{ rows => 1, columns => ['id'], join => ['buildoutputs'] });
|
||||
if (defined $prevBuild) {
|
||||
print STDERR " already scheduled/built as build ", $prevBuild->id, "\n";
|
||||
$buildMap->{$prevBuild->id} = { new => 0, drvPath => $drvPath };
|
||||
$buildMap->{$prevBuild->id} = { id => $prevBuild->id, jobName => $jobName, new => 0, drvPath => $drvPath };
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -506,7 +506,7 @@ sub checkBuild {
|
||||
$build->buildoutputs->create({ name => $_, path => $buildInfo->{output}->{$_}->{path} })
|
||||
foreach @outputNames;
|
||||
|
||||
$buildMap->{$build->id} = { new => 1, drvPath => $drvPath };
|
||||
$buildMap->{$build->id} = { id => $build->id, jobName => $jobName, new => 1, drvPath => $drvPath };
|
||||
$$jobOutPathMap{$jobName . "\t" . $firstOutputPath} = $build->id;
|
||||
|
||||
if ($build->iscachedbuild) {
|
||||
|
Reference in New Issue
Block a user