diff options
author | 2005-09-13 20:54:38 +0000 | |
---|---|---|
committer | 2005-09-13 20:54:38 +0000 | |
commit | d5a96aa3e46bb50de6f3deb116362d2b27d0b8cf (patch) | |
tree | 48f10d7326be9106ef9a964060ba92bc187dbff5 | |
parent | dlopen regress tests. (diff) | |
download | wireguard-openbsd-d5a96aa3e46bb50de6f3deb116362d2b27d0b8cf.tar.xz wireguard-openbsd-d5a96aa3e46bb50de6f3deb116362d2b27d0b8cf.zip |
use grabPlist, avoid getting anything else.
-rw-r--r-- | usr.sbin/pkg_add/pkg_mklocatedb | 8 |
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); } } |