diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-05-05 10:20:59 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-05-05 10:20:59 +0000 |
commit | 2d3dc233f4de3568ab046445fb3afb7db8540927 (patch) | |
tree | d462497f537046668d7d5cdea65c9c5bfe5a9497 /usr.sbin/pkg_add/OpenBSD | |
parent | b1be280aff3a1a788ad7b461277ebbe0bc1f9b29 (diff) |
un-specialcase shallow/deep copy: create a normal new plist.
(so don't copy FCONTENTS since it's automatically created)
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 10 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingList.pm | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 9eab17c4c19..80d146307d3 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingElement.pm,v 1.202 2012/04/28 12:00:10 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.203 2012/05/05 10:20:58 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -1631,6 +1631,14 @@ sub category() { OpenBSD::PackageInfo::CONTENTS } sub write {} +sub copy_shallow_if +{ +} + +sub copy_deep_if +{ +} + package OpenBSD::PackingElement::FCOMMENT; our @ISA=qw(OpenBSD::PackingElement::SpecialFile); sub category() { OpenBSD::PackageInfo::COMMENT } diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index 05398f69b19..5025c902203 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingList.pm,v 1.117 2011/08/27 08:57:39 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.118 2012/05/05 10:20:58 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -113,8 +113,8 @@ sub make_shallow_copy { my ($plist, $h) = @_; - my $copy = bless {state => OpenBSD::PackingList::State->new, - infodir => \(my $d = ${$plist->{infodir}})}, ref($plist); + my $copy = OpenBSD::PackingList->new; + $copy->set_infodir($plist->infodir); $plist->copy_shallow_if($copy, $h); return $copy; } @@ -123,8 +123,8 @@ sub make_deep_copy { my ($plist, $h) = @_; - my $copy = bless {state => OpenBSD::PackingList::State->new, - infodir => \(my $d = ${$plist->{infodir}})}, ref($plist); + my $copy = OpenBSD::PackingList->new; + $copy->set_infodir($plist->infodir); $plist->copy_deep_if($copy, $h); return $copy; } |