summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-05-17 15:40:07 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-05-17 15:40:07 +0000
commite5b9b26b25e8807400b7af9d0a802706d03f1399 (patch)
treed19bb94c72fc64a020c8d21ad8ee9ccc3553e4ac /usr.sbin
parent3017ba8ae131a3dd955e5dc64dc6f00c39243a34 (diff)
library lookup becomes a real method
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Dependencies.pm7
-rw-r--r--usr.sbin/pkg_add/pkg_add6
2 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
index ea125175d01..10631bb3514 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.34 2007/05/17 15:35:58 espie Exp $
+# $OpenBSD: Dependencies.pm,v 1.35 2007/05/17 15:40:06 espie Exp $
#
# Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org>
#
@@ -198,7 +198,10 @@ sub find_old_lib
sub lookup_library
{
- my ($state, $lib, $plist, $dependencies, $done) = @_;
+ my ($self, $state, $lib, $done) = @_;
+
+ my $plist = $self->{plist};
+ my $dependencies = $self->{to_register};
my $r = check_lib_spec($plist->localbase, $lib, $dependencies);
if ($r) {
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 791a1fd6483..0d1d2370bc7 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.251 2007/05/17 15:35:58 espie Exp $
+# $OpenBSD: pkg_add,v 1.252 2007/05/17 15:40:06 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -533,7 +533,6 @@ sub install_package
my $solver = OpenBSD::Dependencies::Solver->new($handle->{plist});
my @deps = $solver->solve($state, @todo);
$handle->{solver} = $solver;
- $handle->{solved_dependencies} = $solver->{to_register};
if ($state->{verbose}) {
$solver->dump;
}
@@ -560,8 +559,7 @@ sub install_package
my $okay = 1;
for my $lib (@{$plist->{wantlib}}) {
my $extra = {};
- if (!OpenBSD::Dependencies::Solver::lookup_library($state, $lib->{name}, $plist,
- $handle->{solved_dependencies}, $extra)) {
+ if (!$handle->{solver}->lookup_library($state, $lib->{name}, $extra)) {
Warn "Can't install $pkg: lib not found ", $lib->{name}, "\n";
clue($extra) if $okay;
$okay = 0;