summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-09-17 12:45:50 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-09-17 12:45:50 +0000
commitad95a1ca68f179c61d052376a1092bfa99d548a0 (patch)
tree16a0c148c75603f3bc42b5f4e3d1cd6e2f1bffca /usr.sbin/pkg_add
parentd83a278a4842b83567eaeea2956f70d9da4d0cc3 (diff)
allows grabbing the packing-list directly from a PackageLocation,
in order to make further code more symetric and efficient.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageLocator.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
index b87f224a86a..bd253c55e22 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.37 2005/09/17 12:10:32 espie Exp $
+# $OpenBSD: PackageLocator.pm,v 1.38 2005/09/17 12:45:49 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -689,6 +689,15 @@ sub info
return $self->{dir};
}
+sub plist
+{
+ my ($self, $code) = @_;
+
+ require OpenBSD::PackingList;
+
+ return OpenBSD::PackingList->fromfile($self->info().CONTENTS, $code);
+}
+
sub close
{
my $self = shift;