summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-05-12 15:00:31 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-05-12 15:00:31 +0000
commit2491cf3ea853b2d89c8d2d9dcae5fdfb6c6e6f2b (patch)
tree6fc2e08c76cf06b7d6c6f501d83ee96ff9fab3cd /usr.sbin
parentfa36ac8543c61b8d8270017bb3319114487e227f (diff)
kill old PkgSpec interface
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageLocator.pm10
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageRepository.pm9
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgSpec.pm6
3 files changed, 7 insertions, 18 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
index 784058e32f3..1c7673748eb 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.62 2007/05/12 14:52:26 espie Exp $
+# $OpenBSD: PackageLocator.pm,v 1.63 2007/05/12 15:00:30 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -123,13 +123,7 @@ sub match_spec
if (!@avail) {
@avail = available();
}
- if (ref $spec) {
- return $spec->match_ref(\@avail);
- } else {
- require OpenBSD::PkgSpec;
-
- return OpenBSD::PkgSpec::match_ref($spec, \@avail);
- }
+ return $spec->match_ref(\@avail);
}
my $stemlist;
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
index 3dbd7c42e8d..69f260571a6 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageRepository.pm,v 1.23 2007/05/12 14:52:26 espie Exp $
+# $OpenBSD: PackageRepository.pm,v 1.24 2007/05/12 15:00:30 espie Exp $
#
# Copyright (c) 2003-2006 Marc Espie <espie@openbsd.org>
#
@@ -68,12 +68,7 @@ sub findstem
sub match_spec
{
my ($self, $spec) = @_;
- if (ref $spec) {
- return $spec->match_ref($self->list);
- } else {
- require OpenBSD::PkgSpec;
- return OpenBSD::PkgSpec::match_ref($spec, $self->list);
- }
+ return $spec->match_ref($self->list);
}
sub wipe_info
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
index 82cfb3b71cb..a0377fe6554 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PkgSpec.pm,v 1.6 2007/05/12 14:36:56 espie Exp $
+# $OpenBSD: PkgSpec.pm,v 1.7 2007/05/12 15:00:30 espie Exp $
#
# Copyright (c) 2003-2005 Marc Espie <espie@openbsd.org>
#
@@ -215,7 +215,7 @@ sub match_ref
my ($self, $r) = @_;
my @l = ();
- for my $subpattern (ref($self) ? @{$self->{patterns}} : split /\|/, $self) {
+ for my $subpattern (@{$self->{patterns}}) {
push(@l, subpattern_match($subpattern, $r));
}
return @l;
@@ -224,7 +224,7 @@ sub match_ref
sub match
{
my ($self, @list) = @_;
- return match_ref($self, \@list);
+ return $self->match_ref(\@list);
}
sub new