This prevents unnecessary work, but it's mostly a refactoring to support combining notification emails.
MNZ67UXOZ427J4FLNA5STC6EB567WU65PJE7B5IOLM4UICU3RFNQC
XYBSTHMJ3NPHX2H34VPZFU3JBS7AHZAIYS3SCIMPQ6ERJKUPW64AC
PMNWRTGJ4GVSMSSAWSUD57B26PCRAHMZIQ5SIWJIK7A74ENKEQLAC
7YBYT2LQML2PKEO6UO4444AGSASS664UCDXW2YO3ALB7THQHCEBQC
OG7BEM57MXPCG56IT5GODPFG77KZXWPXZ7OVZPWQQ56CRJ7KUE2QC
L2E6EVE2RVFVDCUNRJ4CZYSQNS2DZUA5DTBETHBDUQUV2KQQRAOQC
BOFOHCPK7UVE3TUEL4NNOQXN2EQGN6N3ITJWTCOJK5Q6MSHYSOSQC
A63IHCMXH3F4V56HDXJLJVVHKXRSJCJMT2PWXXI2IW3J734J6SGQC
MPGVCHVFX673NHLU3TXNLAVEVP4PJSMVBMZOQQKD53N6KAG6CTLQC
FYO6NECE4YJC76HQIG35NNJABODV7KNQKREK5YKZU6O2MNNSQTMAC
G5A7TZVIRTVTI7P5SESOC567QEYSM4SKBZJNYHBXNCTUV53WSZIAC
CLJQCY2XHIDNNMFBJ5PK3GQEN6RFALEFKXBJRWZPEIKR4PR5ZQ5AC
AS5PAYLIRJWB4JGU6N7WKILONGDIGCKNKS4ZSLRYCNGMUAP3AQSAC
for my $d (@dependentBuilds) {
print STDERR "failing dependent build ", $d->id, " of ", $d->project->name, ":", $d->jobset->name, ":", $d->job->name, "\n";
$d->update(
{ finished => 1
, logfile => ''
, timestamp => time # !!! Why change the timestamp?
, iscachedbuild => 0
, buildstatus => $drvPath eq $d->drvpath ? 1 : 2
, starttime => $time
, stoptime => $time
, errormsg => undef
});
my $step = $d->buildsteps->create(
{ stepnr => nextFreeStepNr($d)
, type => 0 # = build
, drvpath => $drvPath
, busy => 0
, status => 1
, starttime => time
, stoptime => time
, errormsg => $errorMsg
});
addBuildStepOutputs($step);
}
});
}
my $max = $build->buildsteps->find(
{}, {select => {max => 'stepnr + 1'}, as => ['max']});
my $buildStepNr = (defined $max && defined $max->get_column('max')) ? $max->get_column('max') : 1;