diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2023-10-24 13:28:44 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2023-10-24 13:28:44 +0000 |
commit | e24c98dd219d5b5815c36cd0dc6df3b1c7a02edb (patch) | |
tree | 62a9e052b0e459843315ea83b30cb77dc8d97317 /usr.sbin/pkg_add | |
parent | 9aa0f6790cbfb1304fadd9ab58d6a1e398ceefaa (diff) |
revert Subst.pm r1.24 again, it breaks package creation
'+' is a widely used character in LIBxxx_VERSION, e.g. LIBFLAC++_VERSION.
Making it illegal breaks numerous packages.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Subst.pm | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Subst.pm b/usr.sbin/pkg_add/OpenBSD/Subst.pm index d0cc116aa27..062898ae0b6 100644 --- a/usr.sbin/pkg_add/OpenBSD/Subst.pm +++ b/usr.sbin/pkg_add/OpenBSD/Subst.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Subst.pm,v 1.24 2023/10/23 21:53:54 espie Exp $ +# $OpenBSD: Subst.pm,v 1.25 2023/10/24 13:28:43 naddy Exp $ # # Copyright (c) 2008 Marc Espie <espie@openbsd.org> # @@ -46,15 +46,11 @@ sub value($self, $k) sub parse_option($self, $opt) { - if ($opt =~ m/^([^=+]+)(\+?)\=(.*)$/o) { - my ($k, $plus, $v) = ($1, $2, $3); + if ($opt =~ m/^([^=]+)\=(.*)$/o) { + my ($k, $v) = ($1, $2); $v =~ s/^\'(.*)\'$/$1/; $v =~ s/^\"(.*)\"$/$1/; - if ($plus && defined $self->{k}) { - $self->{$k} .= " $v"; - } else { - $self->add($k, $v); - } + $self->add($k, $v); } else { $self->add($opt, 1); } |