diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-06-01 21:50:48 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-06-01 21:50:48 +0000 |
commit | a711a8a80c6c373aaba94b4704464f6715ca663a (patch) | |
tree | 5c5b83cfc025fdafdecb33bd6daf302e8e77e754 /usr.sbin/pkg_add/OpenBSD | |
parent | 38fecfba2aaf6bd15988c4418ebb2d46602a2bf0 (diff) |
don't store stuff in the plist, use the handle which is there for that.
so loop directly over $set->older for replacements.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Replace.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Replace.pm b/usr.sbin/pkg_add/OpenBSD/Replace.pm index 1344612b02b..afc79f80c7e 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.27 2007/06/01 14:58:29 espie Exp $ +# $OpenBSD: Replace.pm,v 1.28 2007/06/01 21:50:47 espie Exp $ # # Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org> # @@ -388,8 +388,10 @@ sub save_old_libraries { my ($set, $state) = @_; - for my $old_plist ($set->actual_replacements) { + for my $o ($set->older) { + my $old_plist = $o->{plist}; + my $oldname = $o->{pkgname}; my $libs = {}; my $p = {}; @@ -414,7 +416,6 @@ sub save_old_libraries require OpenBSD::md5; mkdir($dest); - my $oldname = $old_plist->pkgname; open my $descr, '>', $dest.DESC; print $descr "Stub libraries for $oldname\n"; close $descr; @@ -429,7 +430,7 @@ sub save_old_libraries require OpenBSD::PkgCfl; OpenBSD::PkgCfl::register($stub_list, $state); - walk_depends_closure($old_plist->pkgname, $stub_list, $state); + walk_depends_closure($oldname, $stub_list, $state); } else { print "No libraries to keep\n" if $state->{beverbose}; } |