don't cheat, we have to make clean=package to avoid side-effects with

arch-independent packages.
This commit is contained in:
espie 2010-10-30 11:36:07 +00:00
parent f072ab3a17
commit f7f23f3bdd
3 changed files with 27 additions and 4 deletions

View File

@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
# $OpenBSD: Grabber.pm,v 1.7 2010/10/30 11:19:38 espie Exp $
# $OpenBSD: Grabber.pm,v 1.8 2010/10/30 11:36:07 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
@ -86,6 +86,12 @@ sub grab_signature
return DPB::PortSignature->grab_signature($core, $self, $pkgpath);
}
sub clean_package
{
my ($self, $core, $pkgpath) = @_;
return DPB::CleanPackage->clean($core, $self, $pkgpath);
}
sub complete_subdirs
{
my ($self, $core) = @_;

View File

@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
# $OpenBSD: PortBuilder.pm,v 1.3 2010/10/30 11:19:38 espie Exp $
# $OpenBSD: PortBuilder.pm,v 1.4 2010/10/30 11:36:07 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
@ -97,7 +97,8 @@ sub signature_check
return 1;
} else {
print {$self->{logrebuild}} "$name: rebuild\n";
unlink("$self->{fullrepo}/$name.tgz");
$self->{grabber}->clean_package($self->{core},
$v->fullpkgpath);
return 0;
}
}

View File

@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
# $OpenBSD: Vars.pm,v 1.6 2010/10/30 10:35:09 espie Exp $
# $OpenBSD: Vars.pm,v 1.7 2010/10/30 11:36:07 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
@ -184,4 +184,20 @@ sub grab_signature
return $signature;
}
package DPB::CleanPackage;
our @ISA = qw(DPB::GetThings);
sub clean
{
my ($class, $core, $grabber, $subdir) = @_;
$core->start_pipe(sub {
my $shell = shift;
$class->run_command($core, $shell, $grabber, [$subdir],
'clean=package')
}, "CLEAN-PACKAGE");
my $fh = $core->fh;
while (<$fh>) {
}
$core->terminate;
}
1;