From: naddy Date: Tue, 24 Oct 2023 13:28:43 +0000 (+0000) Subject: revert Subst.pm r1.24 again, it breaks package creation X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7e7e7ff78403a4e363fc215388516d9e8fa7e94c;p=openbsd 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. --- 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 # @@ -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); }