summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-09-19 10:15:02 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-09-19 10:15:02 +0000
commit0fde1cb8956e74d85645aa63bc9c910738cbd7c1 (patch)
tree9c4763426f951034edd086cd19f44615c6595b4f /usr.sbin/pkg_add
parentc8b75a0cc6f84eedd90f45274b51ece68744e134 (diff)
fix PackageRepository::Installed().
let grabPlist finish closing what it opened.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageLocator.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
index 49f41a853ef..ceb8202898e 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageLocator.pm,v 1.39 2005/09/19 09:49:51 espie Exp $
+# $OpenBSD: PackageLocator.pm,v 1.40 2005/09/19 10:15:01 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -141,8 +141,14 @@ sub grabPlist
}
package OpenBSD::PackageRepository::Installed;
+our @ISA=qw(OpenBSD::PackageRepository);
use OpenBSD::PackageInfo;
+sub new
+{
+ bless {}, shift;
+}
+
sub find
{
my ($repository, $name, $arch, $srcpath) = @_;
@@ -628,6 +634,7 @@ sub grabPlist
if (defined $pkg) {
my $plist = $self->plist($code);
$pkg->wipe_info();
+ $pkg->close();
return $plist;
} else {
return undef;