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/PackingList.pm | |
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/PackingList.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingList.pm | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |