diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-12-16 11:20:00 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-12-16 11:20:00 +0000 |
commit | 7eef5f45ea0a981587960961af51656dd5dec7c0 (patch) | |
tree | 2215971cf58617621458c575660e610fce2e6807 /usr.sbin | |
parent | 556a76d142d692bc7e81e0d2dc23ef8aed079856 (diff) |
save depend information into cache when package is installed.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingList.pm | 11 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index 781983dcb24..545e07d2405 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.43 2004/12/16 11:07:33 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.44 2004/12/16 11:19:59 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -349,6 +349,15 @@ sub from_installation sub to_cache { + my ($self) = @_; + return if defined $plist_cache->{$self->pkgname()}; + my $plist = new OpenBSD::PackingList; + for my $c (qw(depend wantlib pkgdep newdepend libdepend)) { + if (defined $self->{$c}) { + $plist->{$c} = $self->{$c}; + } + } + $plist_cache->{$self->pkgname()} = $plist; } sub to_installation diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index e9a14589b3e..92b1352fabd 100644 --- a/usr.sbin/pkg_add/pkg_add +++ b/usr.sbin/pkg_add/pkg_add @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_add,v 1.143 2004/12/16 11:07:33 espie Exp $ +# $OpenBSD: pkg_add,v 1.144 2004/12/16 11:19:58 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -380,6 +380,7 @@ sub really_add($$) "Installation of $pkgname failed"); } OpenBSD::SharedLibs::add_plist_libs($plist); + $plist->to_cache(); my $dest = installed_info($pkgname); OpenBSD::Add::register_installation($dir, $dest, $plist); if (defined $handle->{solved_dependencies}) { |