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QQ56CRJ7KUE2QC
AFTXA575C6JTVLVXTYJUKQGPLBO3NFORLO5XDSPHNL44HXLRH4TAC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
JK2QWPH6EOQXGCADV7C5HSYRVWC5M53LAKVN26EMTLY65IKU3AEQC
6BLUKEQ2M5RGWMPXPYIFIEVEUBV4PYAZ75S2WSBIATMRGYFMQZHQC
H7CNGK4OJNRYZQGPLBGR72DULLEPFQ5UISF5J24D7IMA7SYW5LGQC
X27GNHDV5KPZ5GSH6DCAJMNCEMZLCP7M43JWF2X3O5QWXMOX273AC
POPU2ATH2HHBTGHKRAV3EY2K55P664IARI3YJGLDKVJ6PQPXBQ4AC
7ZHHVD6QVZCR7OHF3OIS52DF7ZIQDIS27OXCKOGMFDO2CTIOGI5AC
}
sub fetchInputSystemBuild {
my ($db, $project, $jobset, $name, $type, $value) = @_;
my ($projectName, $jobsetName, $jobName, $attrs) = parseJobName($value);
$projectName ||= $project->name;
$jobsetName ||= $jobset->name;
my @latestBuilds = $db->resultset('LatestSucceededForJob')
->search({}, {bind => [$projectName, $jobsetName, $jobName]});
my @validBuilds = ();
foreach my $build (@latestBuilds) {
if(isValidPath($build->outpath)) {
push(@validBuilds,$build);
}
}
if (scalar(@validBuilds) == 0) {
print STDERR "input `", $name, "': no previous build available\n";
return undef;
}
my @inputs = ();
foreach my $prevBuild (@validBuilds) {
my $pkgNameRE = "(?:(?:[A-Za-z0-9]|(?:-[^0-9]))+)";
my $versionRE = "(?:[A-Za-z0-9\.\-]+)";
my $relName = ($prevBuild->resultInfo->releasename or $prevBuild->nixname);
my $version = $2 if $relName =~ /^($pkgNameRE)-($versionRE)$/;
my $input =
{ type => "sysbuild"
, storePath => $prevBuild->outpath
, id => $prevBuild->id
, version => $version
, system => $prevBuild->system
};
push(@inputs, $input);
}
return @inputs;
my @filteredJobs = ();
foreach my $job (@{$jobs->{job}}) {
my $validJob = 1;
foreach my $arg (@{$job->{arg}}) {
my $input = $inputInfo->{$arg->{name}}->[$arg->{altnr}] ;
if($input->{type} eq "sysbuild" && ! ($input->{system} eq $job->{system}) ) {
$validJob = 0 ;
}
}
if($validJob) {
push(@filteredJobs, $job);
}
}
$jobs->{job} = \@filteredJobs;
my $info = fetchInput($db, $project, $jobset, $input->name, $input->type, $alt->value);
push @{$$inputInfo{$input->name}}, $info if defined $info;
if($input->type eq "sysbuild") {
my @info = fetchInput($db, $project, $jobset, $input->name, $input->type, $alt->value);
foreach my $info_el (@info) {
push @{$$inputInfo{$input->name}}, $info_el if defined $info_el;
}
} else {
my $info = fetchInput($db, $project, $jobset, $input->name, $input->type, $alt->value);
push @{$$inputInfo{$input->name}}, $info if defined $info;
}