bugfix: strip LIB_DEPENDS of all BASE_PKGPATH
bugfix: use -U when pkg_add -r to update dependencies as well feature: add next stage in ports build to info saved in the lock when things fail.
This commit is contained in:
parent
f8fbbc5b1a
commit
c6fe95a9cb
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Port.pm,v 1.13 2010/04/12 13:43:05 espie Exp $
|
||||
# $OpenBSD: Port.pm,v 1.14 2010/04/15 09:59:07 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -118,10 +118,11 @@ sub run
|
||||
my $job = $core->job;
|
||||
my $dep = {};
|
||||
my $v = $job->{v};
|
||||
my $base = $v->pkgpath_and_flavors;
|
||||
for my $kind (qw(BUILD_DEPENDS LIB_DEPENDS)) {
|
||||
if (exists $v->{info}{$kind}) {
|
||||
for my $d (values %{$v->{info}{$kind}}) {
|
||||
next if $d eq $v;
|
||||
next if $d->pkgpath_and_flavors eq $v;
|
||||
$dep->{$d->fullpkgname} = 1;
|
||||
}
|
||||
}
|
||||
@ -132,7 +133,7 @@ sub run
|
||||
$self->redirect($job->{log});
|
||||
my @cmd = ('/usr/sbin/pkg_add');
|
||||
if ($job->{builder}->{update}) {
|
||||
push(@cmd, "-rq", "-Dupdate", "-Dupdatedepends");
|
||||
push(@cmd, "-rqU", "-Dupdate", "-Dupdatedepends");
|
||||
}
|
||||
if ($job->{builder}->{forceupdate}) {
|
||||
push(@cmd, "-Dinstalled");
|
||||
@ -289,6 +290,16 @@ sub new
|
||||
$class;
|
||||
}
|
||||
|
||||
sub current_task
|
||||
{
|
||||
my $self = shift;
|
||||
if (@{$self->{tasks}} > 0) {
|
||||
return $self->{tasks}[0]{phase};
|
||||
} else {
|
||||
return "<nothing>";
|
||||
}
|
||||
}
|
||||
|
||||
sub pkgpath
|
||||
{
|
||||
my $self = shift;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: PortBuilder.pm,v 1.5 2010/04/06 10:10:03 espie Exp $
|
||||
# $OpenBSD: PortBuilder.pm,v 1.6 2010/04/15 09:59:07 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -85,9 +85,10 @@ sub get
|
||||
|
||||
sub end_lock
|
||||
{
|
||||
my ($self, $lock, $core) = @_;
|
||||
my ($self, $lock, $core, $job) = @_;
|
||||
my $end = time();
|
||||
print $lock "status=$core->{status}\n";
|
||||
print $lock "todo=", $job->current_task, "\n";
|
||||
print $lock "end=$end (", DPB::Util->time2string($end), ")\n";
|
||||
close $lock;
|
||||
}
|
||||
@ -99,7 +100,7 @@ sub build
|
||||
my $log = $self->{logger}->make_logs($v);
|
||||
my $job;
|
||||
$job = DPB::Job::Port->new($log, $v, $self, $special,
|
||||
sub {$self->end_lock($lock, $core); $self->report($v, $job, $core); &$final_sub;});
|
||||
sub {$self->end_lock($lock, $core, $job); $self->report($v, $job, $core); &$final_sub;});
|
||||
$core->start_job($job, $v);
|
||||
# (sub {
|
||||
# }, $v, " (".$self->{heuristics}->measure($v).")");
|
||||
|
Loading…
Reference in New Issue
Block a user