summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-09-13 20:54:39 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-09-13 20:54:39 +0000
commit3aaeb92666df1f1758a53c58afc7d44405024c41 (patch)
tree87bf3ed7f0bda7ed39afb49a208f56a6de52122c /usr.sbin/pkg_add
parenta5aed317156bd72d83d571a6e294f5531bf820d1 (diff)
use grabPlist, avoid getting anything else.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/pkg_mklocatedb8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/pkg_mklocatedb b/usr.sbin/pkg_add/pkg_mklocatedb
index b679a811b5d..f554266399a 100644
--- a/usr.sbin/pkg_add/pkg_mklocatedb
+++ b/usr.sbin/pkg_add/pkg_mklocatedb
@@ -114,12 +114,8 @@ if (@ARGV==0) {
} else {
for my $pkgname (@ARGV) {
print STDERR "$pkgname\n" unless $opt_q;
- my $true_package = OpenBSD::PackageLocator->find($pkgname);
- next unless $true_package;
- my $dir = $true_package->info();
- $true_package->close();
- my $plist = OpenBSD::PackingList->fromfile($dir.CONTENTS);
+ my $plist = OpenBSD::PackageLocator->grabPlist($pkgname);
+ next unless $plist;
$plist->visit('print_name', $fh, $plist->pkgname());
- rmtree($dir);
}
}