move to using BUILD_PACKAGES, so we have the actual tidy list.
Stupid NFS work-around: during/after cleanup, wait until the packages show up. Each wait period of ten seconds will show up as waiting#n.
This commit is contained in:
parent
56fbabc5ca
commit
94c55bc7b4
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Port.pm,v 1.35 2012/10/08 12:41:03 espie Exp $
|
||||
# $OpenBSD: Port.pm,v 1.36 2012/10/11 07:38:39 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -108,6 +108,20 @@ sub run
|
||||
|
||||
sub notime { 0 }
|
||||
|
||||
sub make_sure_we_have_packages
|
||||
{
|
||||
my ($self, $job) = @_;
|
||||
my $check = -f $job->{builder}->pkgfile($job->{v});
|
||||
# check ALL BUILD_PACKAGES
|
||||
for my $w ($job->{v}->build_path_list) {
|
||||
$check &&= -f $job->{builder}->pkgfile($w);
|
||||
}
|
||||
if (!$check) {
|
||||
$job->add_tasks(DPB::Task::Port::VerifyPackages->new(
|
||||
'waiting'.$job->{waiting}++));
|
||||
}
|
||||
}
|
||||
|
||||
package DPB::Task::Port::Serialized;
|
||||
our @ISA = qw(DPB::Task::Port);
|
||||
|
||||
@ -444,9 +458,23 @@ sub finalize
|
||||
return 1;
|
||||
}
|
||||
$self->SUPER::finalize($core);
|
||||
$self->make_sure_we_have_packages($core->job);
|
||||
# $core->job->add_tasks(DPB::Task::Port::VerifyPackages->new('waiting'));
|
||||
}
|
||||
|
||||
package DPB::Task::Port::VerifyPackages;
|
||||
our @ISA = qw(DPB::Task::Port);
|
||||
sub finalize
|
||||
{
|
||||
my ($self, $core) = @_;
|
||||
$self->make_sure_we_have_packages($core->job);
|
||||
}
|
||||
|
||||
sub run
|
||||
{
|
||||
sleep 10;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
package DPB::Port::TaskFactory;
|
||||
my $repo = {
|
||||
@ -460,7 +488,6 @@ my $repo = {
|
||||
'show-size' => 'DPB::Task::Port::ShowSize',
|
||||
'show-fake-size' => 'DPB::Task::Port::ShowFakeSize',
|
||||
'junk' => 'DPB::Task::Port::Uninstall',
|
||||
'final-check' => "DPB::Task::Port::VerifyPackages",
|
||||
};
|
||||
|
||||
sub create
|
||||
@ -549,7 +576,6 @@ sub add_normal_tasks
|
||||
if (!$dontclean) {
|
||||
push @todo, 'clean';
|
||||
}
|
||||
# push @todo, 'final-check';
|
||||
$self->add_tasks(map {DPB::Port::TaskFactory->create($_)} @todo);
|
||||
}
|
||||
|
||||
@ -633,7 +659,7 @@ sub set_watch
|
||||
{
|
||||
my ($self, $logger, $v) = @_;
|
||||
my $expected;
|
||||
for my $w ($logger->pathlist($v)) {
|
||||
for my $w ($v->build_path_list) {
|
||||
if (defined $logsize->{$w}) {
|
||||
$expected = $logsize->{$w};
|
||||
last;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Logger.pm,v 1.8 2012/07/10 09:38:37 espie Exp $
|
||||
# $OpenBSD: Logger.pm,v 1.9 2012/10/11 07:38:38 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -84,27 +84,6 @@ sub link
|
||||
symlink($src, $b);
|
||||
}
|
||||
|
||||
sub pathlist
|
||||
{
|
||||
my ($self, $v) = @_;
|
||||
my @l = ($v);
|
||||
my $stem = $v->pkgpath_and_flavors;
|
||||
my $w = DPB::PkgPath->new($stem);
|
||||
if ($w ne $v) {
|
||||
push(@l, $w);
|
||||
}
|
||||
if (defined $v->{info}) {
|
||||
for my $m (keys %{$v->{info}{MULTI_PACKAGES}}) {
|
||||
next if $m eq '-';
|
||||
my $w = DPB::PkgPath->new("$stem,$m");
|
||||
if ($w ne $v) {
|
||||
push(@l, $w);
|
||||
}
|
||||
}
|
||||
}
|
||||
return @l;
|
||||
}
|
||||
|
||||
sub make_logs
|
||||
{
|
||||
my ($self, $v) = @_;
|
||||
@ -112,7 +91,7 @@ sub make_logs
|
||||
if ($self->{clean}) {
|
||||
unlink($log);
|
||||
}
|
||||
for my $w ($self->pathlist($v)) {
|
||||
for my $w ($v->build_path_list) {
|
||||
$self->link($log, $self->log_pkgname($w));
|
||||
}
|
||||
return $log;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: PkgPath.pm,v 1.33 2012/08/22 07:49:00 espie Exp $
|
||||
# $OpenBSD: PkgPath.pm,v 1.34 2012/10/11 07:38:39 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -166,8 +166,8 @@ sub merge_depends
|
||||
}
|
||||
}
|
||||
# share !
|
||||
if (defined $info->{MULTI_PACKAGES}) {
|
||||
$multi = $info->{MULTI_PACKAGES};
|
||||
if (defined $info->{BUILD_PACKAGES}) {
|
||||
$multi = $info->{BUILD_PACKAGES};
|
||||
}
|
||||
# XXX don't grab dependencies for IGNOREd stuff
|
||||
next if defined $info->{IGNORE};
|
||||
@ -225,6 +225,27 @@ sub merge_depends
|
||||
}
|
||||
}
|
||||
|
||||
sub build_path_list
|
||||
{
|
||||
my ($v) = @_;
|
||||
my @l = ($v);
|
||||
my $stem = $v->pkgpath_and_flavors;
|
||||
my $w = DPB::PkgPath->new($stem);
|
||||
if ($w ne $v) {
|
||||
push(@l, $w);
|
||||
}
|
||||
if (defined $v->{info}) {
|
||||
for my $m (keys %{$v->{info}{BUILD_PACKAGES}}) {
|
||||
next if $m eq '-';
|
||||
my $w = DPB::PkgPath->new("$stem,$m");
|
||||
if ($w ne $v) {
|
||||
push(@l, $w);
|
||||
}
|
||||
}
|
||||
}
|
||||
return @l;
|
||||
}
|
||||
|
||||
sub break
|
||||
{
|
||||
my ($self, $why) = @_;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: PortInfo.pm,v 1.19 2012/09/23 18:13:32 espie Exp $
|
||||
# $OpenBSD: PortInfo.pm,v 1.20 2012/10/11 07:38:39 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -235,7 +235,6 @@ my %adder = (
|
||||
NO_REGRESS => "AddYesNo",
|
||||
REGRESS_IS_INTERACTIVE => "AddYesNo",
|
||||
SUBPACKAGE => "AddInfo",
|
||||
MULTI_PACKAGES => "AddList",
|
||||
BUILD_PACKAGES => "AddList",
|
||||
DPB_PROPERTIES => "AddList",
|
||||
EXTRA => "Extra",
|
||||
|
Loading…
Reference in New Issue
Block a user