diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2009-10-11 18:04:42 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2009-10-11 18:04:42 +0000 |
commit | 1680f809985f02b88c8bd9ca48159aa728703f0d (patch) | |
tree | 2f2120ce2b1e7c699a6485a65437d33b4d23af78 /usr.sbin | |
parent | 446ddc874ec53d28f47db6fa3bd5315491b122f8 (diff) |
maybe I'll change the code later (two XXX), but allows flavor after stem,
so that e.g.
pkg_add star--
pkg_add star--static
are now not ambiguous.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgSpec.pm | 3 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Search.pm | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm index 45f24086f74..237b2a68d35 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.20 2009/04/19 14:58:32 espie Exp $ +# $OpenBSD: PkgSpec.pm,v 1.21 2009/10/11 18:04:41 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -280,6 +280,7 @@ our @ISA = qw(OpenBSD::PkgSpec::SubPattern); sub add_version_constraints { my ($class, $constraints, $vspec) = @_; + return if $vspec eq '*'; # XXX my $v = OpenBSD::PkgSpec::versionspec->new($vspec); die "not a good exact spec" if $$v->{op} ne '='; $$v->{pnum} = -1; diff --git a/usr.sbin/pkg_add/OpenBSD/Search.pm b/usr.sbin/pkg_add/OpenBSD/Search.pm index feda52db719..d7a9cff1599 100644 --- a/usr.sbin/pkg_add/OpenBSD/Search.pm +++ b/usr.sbin/pkg_add/OpenBSD/Search.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Search.pm,v 1.10 2009/04/19 15:18:23 espie Exp $ +# $OpenBSD: Search.pm,v 1.11 2009/10/11 18:04:41 espie Exp $ # # Copyright (c) 2007 Marc Espie <espie@openbsd.org> # @@ -100,6 +100,12 @@ sub new { my ($class, $stem) = @_; + my $flavors; + + if ($stem =~ m/^(.*)\-\-(.*)/) { + # XXX + return OpenBSD::Search::Exact->new("$1-*-$2"); + } return bless {stem => $stem}, $class; } |