summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2021-11-16 15:38:53 +0000
committerMarc Espie <espie@cvs.openbsd.org>2021-11-16 15:38:53 +0000
commit594ce05274a9b3dfb74737153b55559f5e3aa11a (patch)
tree6c312e309db4613f5aaeac84d2399c6b025b383e
parent74cc7319f6cb387e7758b7289c66a829b30fc575 (diff)
tweak the packages-specs regexp a bit:
stem-* shouldn't have any cruft added.
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgSpec.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
index eb85b41a561..8752cf40609 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.46 2019/10/13 16:22:30 espie Exp $
+# $OpenBSD: PkgSpec.pm,v 1.47 2021/11/16 15:38:52 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -196,7 +196,7 @@ sub parse
my $r = {};
# let's try really hard to find the stem and the flavors
- unless ($p =~ m/^(.*?)\-((?:(?:\>|\>\=|\<\=|\<|\=)?\d|\*)[^-]*)(.*)$/) {
+ unless ($p =~ m/^(.*?)\-((?:\>|\>\=|\<\=|\<|\=)?\d[^-]*|\*)(.*)$/) {
return undef;
}
($r->{stemspec}, $r->{vspec}, $r->{flavorspec}) = ($1, $2, $3);