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 ...]
> 
> If I run with -P instead of -I, the errors are not seen.
> 
> The diff at the end avoids a DPB::Util->ts2string($self->{watched}{max})
> call when $self->{watched} is undefined.  My feeling is that the install
> phase does not watch for stuck processes at all, so it benefits from
> this.
> 
> Whether this is the right way or place to address the problem, I don't
> know, but with the patch the errors are suppressed for me.

Naddy reported something similar.

The actual fix would be somewhat different. Watch is set in an odd location
in PortBuilder, whereas it should probably be done at the end of
Job::BasePort->new

(Install could very well get stuck, because install will run build as well
if the package doesn't already exist, so watched should always be set)

I have a patch for this but I haven't been able to test it yet because my
dpb boxes are busy with something else.

Reply via email to