Skip to content

Commit

Permalink
Simplify build exit status handling a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Oct 10, 2024
1 parent 0c3f6a2 commit 4fecb72
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions PBuild/Job.pm
Original file line number Diff line number Diff line change
Expand Up @@ -442,18 +442,20 @@ sub finishjob {
die("fatal build error, see $buildroot/.build.log for more information\n");
}
if ($ret == 3) {
$ret = 1;
$ret = 1; # map badhost to build failure
}
if ($ret == 9) {
rename_build_result($vm, $buildroot);
die("XXX: dynamic buildreqs not implemented yet");
}


rename_build_result($vm, $buildroot) if $ret == 0 || $ret == 9;

if (!$ret && (-l "$buildroot/.build.log" || ! -s _)) {
unlink("$buildroot/.build.log");
PBuild::Util::writestr("$buildroot/.build.log", undef, "build created no logfile!\n");
$ret = 1;
}

if ($ret == 9) {
die("XXX: dynamic buildreqs not implemented yet");
}
if ($ret) {
my $result = { '_log' => "$buildroot/.build.log" };
return ('failed', $result);
Expand Down

0 comments on commit 4fecb72

Please sign in to comment.