Marc Espie wrote: > On Tue, Apr 06, 2021 at 08:49:10PM +0200, Marc Espie wrote: > > On Sun, Apr 04, 2021 at 09:56:49PM +0200, Preben Guldberg wrote: > > > Below is a patch that suppresses errors I get when running dpb with -I:
> > > Use of uninitialized value $ts in sprintf at > > > /usr/ports/infrastructure/lib/DPB/Util.pm line 58. > > > DPB::Util::ts2string(DPB::Util, <undef>) called at > > > /usr/ports/infrastructure/lib/DPB/Job/Port.pm line 1107 > > > > > > DPB::Job::BasePort::timings(DPB::Job::Port::Install=HASH(0xf3c120630d0)(sysutils/iwatch)) > > > called at /usr/ports/infrastructure/lib/DPB/Job/Port.pm line 964 > > > > > > DPB::Job::BasePort::__ANON__(DPB::Core=HASH(0xf3c1203be38)(localhost:sysutils/iwatch)) > > > called at /usr/ports/infrastructure/lib/DPB/Job.pm line 189 > > > > > > DPB::Job::Normal::finalize(DPB::Job::Port::Install=HASH(0xf3c120630d0)(sysutils/iwatch), > > > DPB::Core=HASH(0xf3c1203be38)(localhost:sysutils/iwatch)) called at / > > > [... snip - longer example at the end ...] > Previous patch was a brainfart, I had somehow refactored the code in > the wrong base class (e.g., not a base class at all) > Setting a watched uniformously in DPB::Job::BasePort looks like this: FWIW, I tested on a freshly updated ports tree with and without the patch below. The patch nicely makes the error message go away. Thank you! Preben > Index: PortBuilder.pm > =================================================================== > RCS file: /cvs/ports/infrastructure/lib/DPB/PortBuilder.pm,v > retrieving revision 1.88 > diff -u -p -r1.88 PortBuilder.pm > --- PortBuilder.pm 21 Mar 2021 19:17:34 -0000 1.88 > +++ PortBuilder.pm 14 Apr 2021 15:19:18 -0000 > @@ -255,7 +255,6 @@ sub build > $self->report($v, $job, $core); > &$final_sub($job->{failed}); > }); > - $job->set_watch($self->logger, $v); > $core->start_job($job, $v); > # lonesome takes precedence for swallowing everything > if ($job->{lonesome}) { > @@ -283,7 +282,6 @@ sub wipe > $self->report($v, $job, $core); > &$final_sub($job->{failed}); > }); > - $job->set_watch($self->logger, $v); > $core->start_job($job, $v); > } > Index: Job/Port.pm > =================================================================== > RCS file: /cvs/ports/infrastructure/lib/DPB/Job/Port.pm,v > retrieving revision 1.204 > diff -u -p -r1.204 Port.pm > --- Job/Port.pm 21 Mar 2021 19:17:34 -0000 1.204 > +++ Job/Port.pm 14 Apr 2021 15:19:18 -0000 > @@ -969,6 +969,7 @@ sub new > $job->{current} = ''; > # for stuff that doesn't really lock > $job->{lock} //= DPB::DummyLock->new; > + $job->set_watch($job->{builder}->logger, $job->{v}); > return $job; > }