diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-07 08:10:46 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-07 08:10:46 +0000 |
commit | 3073a2e3ae4f97a1eb5c9e0b95adb22d9268994a (patch) | |
tree | 2a902cbd795ed20b6867b7df51078a26ca034ead | |
parent | 16a37b40e7c1bc762159949cc30444e76e900d85 (diff) |
zap unused parameters.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 41 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 4 |
2 files changed, 22 insertions, 23 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm index e07cd49a6d2..01c1e51ca95 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.13 2007/05/07 08:06:47 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.14 2007/05/07 08:10:45 espie Exp $ # # Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org> # @@ -151,14 +151,14 @@ sub find_old_lib sub lookup_library { - my ($state, $lib, $plist, $dependencies, $harder, $done) = @_; + my ($state, $lib, $plist, $dependencies, $done) = @_; my $r = check_lib_spec($plist->localbase, $lib, $dependencies); if ($r) { print "found libspec $lib in $r\n" if $state->{very_verbose}; return 1; } - if ($harder && $lib !~ m|/|) { + if ($lib !~ m|/|) { OpenBSD::SharedLibs::add_system_libs($state->{destdir}); for my $dir ("/usr", "/usr/X11R6") { @@ -175,26 +175,25 @@ sub lookup_library return 1; } } - if ($harder) { - # lookup through the full tree... - my @todo = keys %$dependencies; - while (my $dep = pop @todo) { - require OpenBSD::RequiredBy; - - next if $done->{$dep}; - $done->{$dep} = 1; - for my $dep2 (OpenBSD::Requiring->new($dep)->list()) { - push(@todo, $dep2) unless $done->{$dep2}; - } - next if $dependencies->{$dep}; - OpenBSD::SharedLibs::add_package_libs($dep); - if (check_lib_spec($plist->localbase, $lib, {$dep => 1})) { - print "found libspec $lib in dependent package $dep\n" if $state->{verbose}; - $dependencies->{$dep} = 1; - return 1; - } + # lookup through the full tree... + my @todo = keys %$dependencies; + while (my $dep = pop @todo) { + require OpenBSD::RequiredBy; + + next if $done->{$dep}; + $done->{$dep} = 1; + for my $dep2 (OpenBSD::Requiring->new($dep)->list()) { + push(@todo, $dep2) unless $done->{$dep2}; + } + next if $dependencies->{$dep}; + OpenBSD::SharedLibs::add_package_libs($dep); + if (check_lib_spec($plist->localbase, $lib, {$dep => 1})) { + print "found libspec $lib in dependent package $dep\n" if $state->{verbose}; + $dependencies->{$dep} = 1; + return 1; } } + if ($state->{forced}->{boguslibs}) { my $explored = {}; # lookup through the full tree... diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index 30bc28225e1..604e12b2f10 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.232 2007/05/07 08:05:23 espie Exp $ +# $OpenBSD: pkg_add,v 1.233 2007/05/07 08:10:45 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -556,7 +556,7 @@ sub install_package for my $lib (@{$plist->{wantlib}}) { my $extra = {}; if (!OpenBSD::Dependencies::lookup_library($state, $lib->{name}, $plist, - $handle->{solved_dependencies}, 1, $extra)) { + $handle->{solved_dependencies}, $extra)) { Warn "Can't install $pkg: lib not found ", $lib->{name}, "\n"; clue($extra) if $okay; $okay = 0; |