summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_info
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-04-19 14:58:33 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-04-19 14:58:33 +0000
commitec8ddac0b1b2a0ba80424a1b47bb6bab9e35bcf5 (patch)
treed6cca43827cdc725b832e2a73bf959a6200d61f2 /usr.sbin/pkg_add/pkg_info
parent087733393d1622a68046244a995781b5af3496b2 (diff)
synch with my new style search/location changes
It's likely there will be some fallout, but it's getting a bit too large to keep around. This does kill a few very old oddities as well.
Diffstat (limited to 'usr.sbin/pkg_add/pkg_info')
-rw-r--r--usr.sbin/pkg_add/pkg_info13
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.sbin/pkg_add/pkg_info b/usr.sbin/pkg_add/pkg_info
index 64d2720a210..04f3aba03ad 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.72 2009/04/14 17:53:58 espie Exp $
+# $OpenBSD: pkg_info,v 1.73 2009/04/19 14:58:32 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -72,11 +72,10 @@ sub find_pkg_in
if (OpenBSD::PackageName::is_stem($pkgname)) {
require OpenBSD::Search;
- my @l = sort ($repo->match(OpenBSD::Search::Stem->new($pkgname)));
- if (@l != 0) {
- for my $p (@l) {
- my $pkg = $repo->find($p);
- &$code($p, $pkg);
+ my $l = $repo->match_locations(OpenBSD::Search::Stem->new($pkgname));
+ if (@$l != 0) {
+ for my $pkg (sort {$a->name cmp $b->name} @$l) {
+ &$code($pkg->name, $pkg);
$pkg->close_now;
$pkg->wipe_info;
}
@@ -213,7 +212,7 @@ sub find_by_path
$plist->pkgname);
if ($plist->has('pkgpath')) {
for my $p (@{$plist->{pkgpath}}) {
- add_to_path_info($p->{name},
+ add_to_path_info($p->name,
$plist->pkgname);
}
}