diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2009-12-04 10:45:21 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2009-12-04 10:45:21 +0000 |
commit | 818d7eaaff82adeea0f6a2331ddad02befac2623 (patch) | |
tree | 35b97c19c6cea2b8ef7f1dfdb1c7b91909487362 /usr.sbin | |
parent | 9bf4bb99d29591d10921b319a757abe69e3cf8cf (diff) |
simpler unified lookup for libs inside set/installed packages.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm index 8fc7ee83620..1cb6b09901f 100644 --- a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm +++ b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Dependencies.pm,v 1.92 2009/12/03 18:49:59 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.93 2009/12/04 10:45:20 espie Exp $ # # Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org> # @@ -113,7 +113,12 @@ sub find_in_extra_sources sub find_in_new_source { my ($self, $solver, $state, $obj, $dep) = @_; - OpenBSD::SharedLibs::add_libs_from_installed_package($dep); + + if ($solver->{set}->{newer}->{$dep}) { + OpenBSD::SharedLibs::add_libs_from_plist($solver->{set}->{newer}->{$dep}->plist); + } else { + OpenBSD::SharedLibs::add_libs_from_installed_package($dep); + } if ($solver->check_lib_spec($solver->{localbase}, $obj, {$dep => 1})) { $state->say("found libspec $obj in package $dep") @@ -489,9 +494,6 @@ sub solve_wantlibs my $lib_finder = OpenBSD::lookup::library->new($solver); for my $h ($solver->{set}->newer) { - OpenBSD::SharedLibs::add_libs_from_plist($h->plist); - } - for my $h ($solver->{set}->newer) { for my $lib (@{$h->{plist}->{wantlib}}) { $solver->{localbase} = $h->{plist}->localbase; next if $lib_finder->lookup($solver, |