I just committed a fixed version.
more precisely:

> Index: Engine.pm
> ===================================================================
> RCS file: /home/openbsd/cvs/ports/infrastructure/lib/DPB/Engine.pm,v
> retrieving revision 1.83
> diff -u -p -r1.83 Engine.pm
> --- Engine.pm 30 Jun 2013 16:45:16 -0000      1.83
> +++ Engine.pm 15 Jul 2013 12:58:53 -0000
> @@ -200,19 +332,17 @@ sub done
>  
>  sub end
>  {
> -     my ($self, $core, $v) = @_;
> +     my ($self, $core, $v, $fail) = @_;
>       my $e = $core->mark_ready;
> -     if ($self->is_done($v)) {
> -             $self->{engine}{locker}->unlock($v);
> -             $self->end_build($v);
> -             $core->success;
> -     } else {
> +     if ($fail) {
>               $core->failure;
>               if (!$e || $core->{status} == 65280) {
>                       $self->add($v);
>                       $self->{engine}{locker}->unlock($v);
>                       $self->log('N', $v);
>               } else {
> +                     # XXX in case some packages got built
> +                     $self->is_done($v);
>                       unshift(@{$self->{engine}{errors}}, $v);
>                       $v->{host} = $core->host;
>                       $self->log('E', $v);
> @@ -220,9 +350,17 @@ sub end
>                               $self->end_build($v);
>                       }
>               }
> +     } else {
> +             if ($self->is_done_or_enqueue($v)) {
> +                     $self->{engine}{locker}->unlock($v);
> +             } else {
> +                     push(@{$self->{nfslist}}, $v);
> +             }
> +             $self->end_build($v);
> +             $core->success;
> +             $self->done($v);
^^^^ that's wrong
> +             $self->{engine}->flush;
>       }
> -     $self->done($v);
> -     $self->{engine}->flush;
>  }
>  
>  sub dump

$self->done($v) should always be called, not only in failure cases, since
otherwise paths will stay "locked" internally.

Problem case: path errors out. Fix the issue, remove the lock -> won't get
built, as it's still in the {doing} hash, so it keeps getting ^.

Reply via email to