* Generic declaration of build products.

This commit is contained in:
Eelco Dolstra
2008-11-07 17:10:34 +00:00
parent 2d52634b1e
commit ffd0f75692
15 changed files with 88 additions and 32 deletions

View File

@ -96,13 +96,8 @@ sub buildJob {
if ($outputCreated) {
$db->resultset('Buildproducts')->create(
{ buildid => $build->id
, type => "nix-build"
, subtype => ""
, path => $outPath
});
my $productnr = 0;
if (-e "$outPath/log") {
foreach my $logPath (glob "$outPath/log/*") {
print " LOG $logPath\n";
@ -114,6 +109,33 @@ sub buildJob {
});
}
}
if (-e "$outPath/nix-support/hydra-build-products") {
open LIST, "$outPath/nix-support/hydra-build-products" or die;
while (<LIST>) {
/^(\w+)\s+([\w-]+)\s+(\S+)$/ or die;
my $type = $1;
my $subtype = $2;
my $path = $3;
die unless -e $path;
$db->resultset('Buildproducts')->create(
{ buildid => $build->id
, productnr => $productnr++
, type => $type
, subtype => $subtype
, path => $path
});
}
close LIST;
} else {
$db->resultset('Buildproducts')->create(
{ buildid => $build->id
, productnr => $productnr++
, type => "nix-build"
, subtype => ""
, path => $outPath
});
}
}
});