Prevent multiple builds with the same (job, outPath) tuple from being added

This happened in a pathological case in Nixpkgs: the "grub" job is
evaluated for i686-linux and x86_64-linux, but in the latter case it
returns the same derivation as in the former case.  So only one build
should be added.
This commit is contained in:
Eelco Dolstra
2012-04-02 15:56:29 +00:00
parent 9d4cb29e08
commit 2f9153c640
3 changed files with 14 additions and 3 deletions

View File

@ -532,7 +532,7 @@ sub clone_submit : Chained('build') PathPart('clone/submit') Args(0) {
my %currentBuilds;
my $newBuild = checkBuild(
$c->model('DB'), $build->project, $build->jobset,
$inputInfo, $nixExprInput, $job, \%currentBuilds, undef);
$inputInfo, $nixExprInput, $job, \%currentBuilds, undef, {});
error($c, "This build has already been performed.") unless $newBuild;