diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-08-16 20:05:13 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-08-16 20:05:13 +0000 |
commit | b2677c3e8df8044ff7c931b723cc25a1cb568ea6 (patch) | |
tree | acd4f587caaaeff9147d152c32f7a09a44d33041 | |
parent | dab7f06e4389239b48e816ad1a29161832943619 (diff) |
make sure libs get registered if we take a shortcut and don't reinstall
the package, or if we call add_bogus_libs directly.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/SharedLibs.pm | 7 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm index 05ca249e048..7b204de4a62 100644 --- a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm +++ b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: SharedLibs.pm,v 1.7 2005/08/12 16:57:15 espie Exp $ +# $OpenBSD: SharedLibs.pm,v 1.8 2005/08/16 20:05:12 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -152,7 +152,10 @@ sub add_package_libs sub add_bogus_package_libs { my $pkgname = $_[0]; - return if defined $done_plist->{$pkgname} && $done_plist->{$pkgname} == 2; + if (!defined $done_plist->{$pkgname}) { + add_package_libs($pkgname); + } + return if $done_plist->{$pkgname} == 2; $done_plist->{$pkgname} = 2; my $plist = OpenBSD::PackingList->from_installation($pkgname); if (!defined $plist) { diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index 4a0e2399f2d..12fe60dcc28 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.185 2005/08/16 16:24:23 espie Exp $ +# $OpenBSD: pkg_add,v 1.186 2005/08/16 20:05:12 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -89,6 +89,7 @@ sub can_install($$$) if (is_installed($plist->pkgname()) && !$state->{forced}->{installed}) { if (!OpenBSD::Update::is_needed($plist, $state)) { + OpenBSD::SharedLibs::add_package_libs($plist->pkgname()); $state->{installed}->{$pkgname} = 1; return undef; } @@ -470,6 +471,7 @@ sub install_package if (is_installed($plist->pkgname()) && !$state->{forced}->{installed}) { if ($state->{replace}) { if (!OpenBSD::Update::is_needed($plist, $state)) { + OpenBSD::SharedLibs::add_package_libs($plist->pkgname()); $state->{installed}->{$handle->{pkgname}} = 1; $handle->close(); return (); |