tie engine with var grabber, get ready to re-do port meta on error.
This commit is contained in:
parent
40d4daffe8
commit
d4ee90931f
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Engine.pm,v 1.6 2010/10/26 16:57:10 espie Exp $
|
||||
# $OpenBSD: Engine.pm,v 1.7 2010/10/27 12:58:26 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -312,6 +312,12 @@ sub requeue
|
||||
$self->{heuristics}->finish_special($v);
|
||||
}
|
||||
|
||||
sub rescan
|
||||
{
|
||||
my ($self, $v) = @_;
|
||||
push(@{$self->{requeued}}, $v);
|
||||
}
|
||||
|
||||
sub add_fatal
|
||||
{
|
||||
my ($self, $v) = @_;
|
||||
@ -350,10 +356,10 @@ sub rebuild_info
|
||||
for my $v (@l) {
|
||||
delete $v->{info};
|
||||
}
|
||||
# todo: calls vars again after stripping stuff bare.
|
||||
for my $v (@l) {
|
||||
$self->new_path($v);
|
||||
}
|
||||
my @subdirs = map {$_->fullpkgpath} @l;
|
||||
$self->{grabber}->grab_subdirs($core, \@subdirs);
|
||||
# XXX todo something needs to happen after the rescan,
|
||||
# along the lines of finished_scanning
|
||||
}
|
||||
|
||||
sub start_new_job
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Grabber.pm,v 1.2 2010/10/23 18:02:59 espie Exp $
|
||||
# $OpenBSD: Grabber.pm,v 1.3 2010/10/27 12:58:26 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -25,13 +25,15 @@ package DPB::Grabber;
|
||||
sub new
|
||||
{
|
||||
my ($class, $ports, $make, $logger, $engine, $dpb, $endcode) = @_;
|
||||
bless { ports => $ports, make => $make,
|
||||
my $o = bless { ports => $ports, make => $make,
|
||||
loglist => DPB::Util->make_hot($logger->open("vars")),
|
||||
engine => $engine,
|
||||
dpb => $dpb,
|
||||
keep_going => 1,
|
||||
endcode => $endcode
|
||||
}, $class;
|
||||
$engine->{grabber} = $o;
|
||||
return $o;
|
||||
}
|
||||
|
||||
sub finish
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Locks.pm,v 1.2 2010/10/26 16:57:10 espie Exp $
|
||||
# $OpenBSD: Locks.pm,v 1.3 2010/10/27 12:58:26 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -117,7 +117,12 @@ sub recheck_errors
|
||||
if ($self->locked($v)) {
|
||||
push(@{$engine->{$name}}, $v);
|
||||
} else {
|
||||
$engine->requeue($v);
|
||||
# XXX not ready yet
|
||||
# if ($name eq 'errors') {
|
||||
# $engine->rescan($v);
|
||||
# } else {
|
||||
$engine->requeue($v);
|
||||
# }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: PortBuilder.pm,v 1.1.1.1 2010/08/20 13:40:13 espie Exp $
|
||||
# $OpenBSD: PortBuilder.pm,v 1.2 2010/10/27 12:58:26 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: PortInfo.pm,v 1.1.1.1 2010/08/20 13:40:13 espie Exp $
|
||||
# $OpenBSD: PortInfo.pm,v 1.2 2010/10/27 12:58:26 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user