summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Dependencies.pm10
-rw-r--r--usr.sbin/pkg_add/pkg_add4
2 files changed, 9 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
index bce3d732d73..ea125175d01 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.33 2007/05/17 14:08:49 espie Exp $
+# $OpenBSD: Dependencies.pm,v 1.34 2007/05/17 15:35:58 espie Exp $
#
# Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org>
#
@@ -49,6 +49,12 @@ sub dependencies
}
}
+sub has_dep
+{
+ my ($self, $dep) = @_;
+ return $self->{to_register}->{$dep};
+}
+
sub pkgname
{
my $self = shift;
@@ -159,8 +165,6 @@ sub dump
}
}
-package OpenBSD::Dependencies;
-
use OpenBSD::SharedLibs;
sub check_lib_spec
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 96d8a3932f3..791a1fd6483 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.250 2007/05/17 14:13:40 espie Exp $
+# $OpenBSD: pkg_add,v 1.251 2007/05/17 15:35:58 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -560,7 +560,7 @@ sub install_package
my $okay = 1;
for my $lib (@{$plist->{wantlib}}) {
my $extra = {};
- if (!OpenBSD::Dependencies::lookup_library($state, $lib->{name}, $plist,
+ if (!OpenBSD::Dependencies::Solver::lookup_library($state, $lib->{name}, $plist,
$handle->{solved_dependencies}, $extra)) {
Warn "Can't install $pkg: lib not found ", $lib->{name}, "\n";
clue($extra) if $okay;