From ebf3760c26025a6c498c5d5dd2c9d1a8a46be64b Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Mon, 18 Apr 2011 19:29:52 +0100 Subject: configpm: handle multi-line key='value\n...' There is old code in configpm to handle mulit-line entries in config.sh along the lines of plibpth='/lib/x86_64-redhat-linux/4.4.5/ /lib/../lib64/ /usr/lib/x86_64-redhat-linux/4.4.5/ /usr/lib/../lib64/ /lib/ /usr/lib/' which was broken, and produced Use of uninitialized value $1 warnings, and messed up the content of lib/Config_heavy.pl. We probably normally don't have multi-line entries, which is why no-one noticed it before, but 40f026236b9959b7ad3260fedc6c66cd30bb7abc has started generating the entry above. --- configpm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'configpm') diff --git a/configpm b/configpm index 7d6de3721e..77e0a56aa7 100755 --- a/configpm +++ b/configpm @@ -292,6 +292,7 @@ my @non_v = (); my @v_others = (); my $in_v = 0; my %Data = (); +my $quote; my %seen_quotes; @@ -323,11 +324,11 @@ my %seen_quotes; push(@non_v, "#$_"); # not a name='value' line next; } - my $quote = $2; if ($in_v) { $val .= $_; } else { + $quote = $2; ($name,$val) = ($1,$3); } $in_v = $val !~ /$quote\n/; -- cgit v1.2.1