Rename aggregate members to constituents

This commit is contained in:
Eelco Dolstra
2013-08-15 02:33:10 +02:00
parent e4141afcc9
commit 1776d9118f
7 changed files with 67 additions and 59 deletions

View File

@ -183,16 +183,16 @@ sub checkJobsetWrapped {
$drvPathToId{$x->{drvPath}} = $id;
}
# Create AggregateMembers mappings.
# Create AggregateConstituents mappings.
foreach my $job (@{$jobs->{job}}) {
next unless $job->{members};
next unless $job->{constituents};
my $id = $drvPathToId{$job->{drvPath}} or die;
foreach my $drvPath (split / /, $job->{members}) {
my $member = $drvPathToId{$drvPath};
if (defined $member) {
$db->resultset('AggregateMembers')->update_or_create({aggregate => $id, member => $member});
foreach my $drvPath (split / /, $job->{constituents}) {
my $constituent = $drvPathToId{$drvPath};
if (defined $constituent) {
$db->resultset('AggregateConstituents')->update_or_create({aggregate => $id, constituent => $constituent});
} else {
warn "aggregate job $job->{jobName} has a member $drvPath that doesn't correspond to a Hydra build\n";
warn "aggregate job $job->{jobName} has a constituent $drvPath that doesn't correspond to a Hydra build\n";
}
}
}