diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-30 13:03:55 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-30 13:03:55 +0000 |
commit | 777219d853b9cdba842aaba756848976c4f8eb3b (patch) | |
tree | beaf08bb3d1a082e07d921820808aa885552e501 /usr.sbin/pkg_add/OpenBSD | |
parent | 3d5d9adbd951905c2763f1dc6bb67dc2fb2f767d (diff) |
avoid setting partial directly when we can, use inheritance instead.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Add.pm | 16 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Replace.pm | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index 8bb37288bbf..a8917d706b8 100644 --- a/usr.sbin/pkg_add/OpenBSD/Add.pm +++ b/usr.sbin/pkg_add/OpenBSD/Add.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Add.pm,v 1.63 2007/05/30 12:52:07 espie Exp $ +# $OpenBSD: Add.pm,v 1.64 2007/05/30 13:03:54 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -206,7 +206,7 @@ sub prepare_for_addition sub install { my ($self, $state) = @_; - $state->{partial}->{$self} = 1; + $self->SUPER::install($state); my $auth = $self->{name}; print "adding ", $self->type, " $auth\n" if $state->{verbose}; return if $state->{not}; @@ -253,7 +253,7 @@ sub install my ($self, $state) = @_; my $name = $self->{name}; - $state->{partial}->{$self} = 1; + $self->SUPER::install($state); open(my $pipe, '-|', '/sbin/sysctl', '-n', $name); my $actual = <$pipe>; chomp $actual; @@ -303,7 +303,7 @@ sub prepare_for_addition sub install { my ($self, $state) = @_; - $state->{partial}->{$self} = 1; + $self->SUPER::install($state); my $fullname = $self->fullname; my $destdir = $state->{destdir}; @@ -384,7 +384,7 @@ sub install { my ($self, $state) = @_; - $state->{partial}->{$self} = 1; + $self->SUPER::install($state); $state->{end_faked} = 1; } @@ -422,7 +422,7 @@ sub install { my ($self, $state) = @_; - $state->{partial}->{$self} = 1; + $self->SUPER::install($state); my $destdir = $state->{destdir}; my $filename = $destdir.$self->fullname; my $orig = $self->{copyfrom}; @@ -522,7 +522,7 @@ package OpenBSD::PackingElement::Dir; sub install { my ($self, $state) = @_; - $state->{partial}->{$self} = 1; + $self->SUPER::install($state); my $fullname = $self->fullname; my $destdir = $state->{destdir}; @@ -539,7 +539,7 @@ sub install { my ($self, $state) = @_; - $state->{partial}->{$self} = 1; + $self->SUPER::install($state); $self->run($state); } diff --git a/usr.sbin/pkg_add/OpenBSD/Replace.pm b/usr.sbin/pkg_add/OpenBSD/Replace.pm index f96651db371..43f50f9b527 100644 --- a/usr.sbin/pkg_add/OpenBSD/Replace.pm +++ b/usr.sbin/pkg_add/OpenBSD/Replace.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Replace.pm,v 1.23 2007/05/30 12:52:07 espie Exp $ +# $OpenBSD: Replace.pm,v 1.24 2007/05/30 13:03:54 espie Exp $ # # Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org> # @@ -67,7 +67,7 @@ sub extract return; } - $state->{partial}->{$self} = 1; + $self->SUPER::extract($state); my $d = dirname($file->{destdir}.$file->{name}); while (!-d $d && -e _) { $d = dirname($d); @@ -96,7 +96,7 @@ sub extract my $destdir = $state->{destdir}; return if -e $destdir.$fullname; - $state->{partial}->{$self} = 1; + $self->SUPER::extract($state); print "new directory ", $destdir, $fullname, "\n" if $state->{very_verbose}; return if $state->{not}; File::Path::mkpath($destdir.$fullname); |