From: tb Date: Mon, 23 Oct 2023 19:45:28 +0000 (+0000) Subject: Revert Subst.pm r1.22. It broke ordinary pkg_add usage X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6c70526fad6dcfcac200cff20db0df29d187a15c;p=openbsd Revert Subst.pm r1.22. It broke ordinary pkg_add usage --- diff --git a/usr.sbin/pkg_add/OpenBSD/Subst.pm b/usr.sbin/pkg_add/OpenBSD/Subst.pm index dbc15dc10b7..47c684da07a 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.22 2023/10/23 08:37:45 espie Exp $ +# $OpenBSD: Subst.pm,v 1.23 2023/10/23 19:45:28 tb 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); }