From 618300a0b4dfc2f2d9a12f09cea578b2a2137abc Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 23 Oct 2023 21:53:54 +0000 Subject: [PATCH] sorry, somehow I did redo this line badly and didn't retest --- usr.sbin/pkg_add/OpenBSD/Subst.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/Subst.pm b/usr.sbin/pkg_add/OpenBSD/Subst.pm index 47c684da07a..d0cc116aa27 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.23 2023/10/23 19:45:28 tb Exp $ +# $OpenBSD: Subst.pm,v 1.24 2023/10/23 21:53:54 espie Exp $ # # Copyright (c) 2008 Marc Espie # @@ -46,11 +46,15 @@ sub value($self, $k) sub parse_option($self, $opt) { - if ($opt =~ m/^([^=]+)\=(.*)$/o) { - my ($k, $v) = ($1, $2); + if ($opt =~ m/^([^=+]+)(\+?)\=(.*)$/o) { + my ($k, $plus, $v) = ($1, $2, $3); $v =~ s/^\'(.*)\'$/$1/; $v =~ s/^\"(.*)\"$/$1/; - $self->add($k, $v); + if ($plus && defined $self->{k}) { + $self->{$k} .= " $v"; + } else { + $self->add($k, $v); + } } else { $self->add($opt, 1); } -- 2.20.1