Currently running the following patch.
Symptom: databases/puppetdb4 failed to build the -plugins subpackage.
Turns out the code in end in SubEngine.pm correctly flags the build
as failed, and check for packages that were built, and queues the
error:
# XXX in case some packages got built
$self->is_done($v);
unshift(@{$self->{engine}{errors}}, $v);
$v->{host} = $core->host;
$self->log('E', $v);
if ($core->prop->{always_clean}) {
$self->end_build($v);
}
BUT the code that rechecks errors (ErrorList.pm) is flaky, because
unlock_conditions only verifies the main subpackage.
So you see the E: in engine.log, but the lock promptly gets removed
first time dpb recheck for errors.
Queuing all of $v->build_path_list won't work, as the locks are explicitly
tagged with just the pkgpath (for good reason), so unlock_conditions has to
forego unlocking unless all of build_path_list are actually okay.
Please test.
This seems to work. It requires a few full bulks with errors and aggressive
lock removal to make sure.
==================================================================
RCS file: /cvs/ports/infrastructure/lib/DPB/PkgPath.pm,v
retrieving revision 1.51
diff -u -p -r1.51 PkgPath.pm
--- PkgPath.pm 2 Jul 2015 08:04:22 -0000 1.51
+++ PkgPath.pm 6 Nov 2018 16:15:06 -0000
@@ -155,7 +155,15 @@ sub print_parent
sub unlock_conditions
{
my ($v, $engine) = @_;
- return $v->{info} && $engine->{buildable}{builder}->check($v);
+ if (!$v->{info}) {
+ return 0;
+ }
+ my $sub = $engine->{buildable};
+ for my $w ($v->build_path_list) {
+ return 0
+ unless $sub->remove_stub($w) || $sub->{builder}->check($w);
+ }
+ return 1;
}
sub requeue