From 27b13d6cff64beb930a994f168068f7e88fd3010 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Tue, 10 Nov 2009 10:50:35 +0000 Subject: kill one use of old-style match --- usr.sbin/pkg_add/pkg_info | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.sbin/pkg_add/pkg_info') diff --git a/usr.sbin/pkg_add/pkg_info b/usr.sbin/pkg_add/pkg_info index 37675c457d8..30b7f982453 100644 --- a/usr.sbin/pkg_add/pkg_info +++ b/usr.sbin/pkg_add/pkg_info @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_info,v 1.78 2009/10/15 10:47:07 phessler Exp $ +# $OpenBSD: pkg_info,v 1.79 2009/11/10 10:50:34 espie Exp $ # # Copyright (c) 2003-2009 Marc Espie # @@ -162,7 +162,9 @@ sub find_by_spec require OpenBSD::Search; require OpenBSD::PackageRepository::Installed; - return sort(OpenBSD::PackageRepository::Installed->new->match(OpenBSD::Search::PkgSpec->new($pat))); + my $r = OpenBSD::PackageRepository::Installed->new->match_locations(OpenBSD::Search::PkgSpec->new($pat)); + + return sort (map {$_->name} @$r); } sub filter_files -- cgit v1.2.3