summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-06-26 12:44:30 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-06-26 12:44:30 +0000
commitf08f8c30af9163ee7c12a10775fd8b88de473a84 (patch)
treec933955b1fa40d6916c307a2b84422d8c5e4b5ed /usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
parent8dfaad7b4a581a206c5ae72277d456e14da995ec (diff)
select fat package based on name too.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackageLocator.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageLocator.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
index 4eaefa1641a..e06221691c4 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.12 2005/06/26 11:25:11 espie Exp $
+# $OpenBSD: PackageLocator.pm,v 1.13 2005/06/26 12:44:29 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -367,6 +367,7 @@ sub openAbsolute
my $self = { location => $location, name => $name};
bless $self, $class;
+
if (!$self->_open()) {
return undef;
}
@@ -397,7 +398,10 @@ OKAY:
$e->{name}=$dir.CONTENTS;
eval { $e->create(); };
require OpenBSD::PackingList;
+ my $pkgname = $name;
+ $pkgname =~ s/\.tgz$//;
my $plist = OpenBSD::PackingList->fromfile($dir.CONTENTS, \&OpenBSD::PackingList::FatOnly);
+ next if $pkgname ne '-' and $plist->pkgname() ne $pkgname;
if ($plist->has('arch')) {
if ($plist->{arch}->check($arch)) {
$self->{filter} = $prefix;