summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-05-07 14:33:31 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-05-07 14:33:31 +0000
commita23c5c4b2a4a1da8abaff148f02db08353e8610e (patch)
tree6cdf57244b7e24b24ceb35934a8b1c31b39bb36d
parentfe49d9a37f5b2a89242e5ac7ddf5c9a305b6a4e9 (diff)
avoid calling compile_stemlist directly
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageInfo.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm b/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm
index cf0085ca805..7b915f5abc6 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageInfo.pm,v 1.22 2007/04/15 10:17:29 espie Exp $
+# $OpenBSD: PackageInfo.pm,v 1.23 2007/05/07 14:33:30 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -187,7 +187,6 @@ sub solve_installed_names
{
my ($old, $new, $msg, $state) = @_;
- my $installed;
my $bad = 0;
my $seen = {};
@@ -200,10 +199,9 @@ sub solve_installed_names
}
} else {
if (OpenBSD::PackageName::is_stem($pkgname)) {
- if (!defined $installed) {
- $installed = OpenBSD::PackageName::compile_stemlist(installed_packages());
- }
- my @l = $installed->findstem($pkgname);
+ require OpenBSD::PackageRepository;
+
+ my @l = OpenBSD::PackageRepository::Installed->new->findstem($pkgname);
if (@l == 0) {
print "Can't resolve $pkgname to an installed package name\n";
$bad = 1;