diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-07 14:33:31 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-07 14:33:31 +0000 |
commit | a23c5c4b2a4a1da8abaff148f02db08353e8610e (patch) | |
tree | 6cdf57244b7e24b24ceb35934a8b1c31b39bb36d | |
parent | fe49d9a37f5b2a89242e5ac7ddf5c9a305b6a4e9 (diff) |
avoid calling compile_stemlist directly
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageInfo.pm | 10 |
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; |