diff options
author | 2009-10-11 18:04:41 +0000 | |
---|---|---|
committer | 2009-10-11 18:04:41 +0000 | |
commit | 41e3defd1458e7c7afaa5a32524ee07588d8e360 (patch) | |
tree | 0e39987d273f64e6b3638fedbab1808b3e3a2000 | |
parent | sync (diff) | |
download | wireguard-openbsd-41e3defd1458e7c7afaa5a32524ee07588d8e360.tar.xz wireguard-openbsd-41e3defd1458e7c7afaa5a32524ee07588d8e360.zip |
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.
-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; } |