summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-06-09 14:22:11 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-06-09 14:22:11 +0000
commit7e35c0c2fde152442b639dad9d031121cdd8c869 (patch)
tree373b5a3e34e167785d8dd541eebab1337c33d726
parent4f3c32546b547af6262d8930a45dba1424528eeb (diff)
downloadperl-MDK-Common-7e35c0c2fde152442b639dad9d031121cdd8c869.tar
perl-MDK-Common-7e35c0c2fde152442b639dad9d031121cdd8c869.tar.gz
perl-MDK-Common-7e35c0c2fde152442b639dad9d031121cdd8c869.tar.bz2
perl-MDK-Common-7e35c0c2fde152442b639dad9d031121cdd8c869.tar.xz
perl-MDK-Common-7e35c0c2fde152442b639dad9d031121cdd8c869.zip
Correctly handling '#' when loading shell variables (#50670, #51457).
-rw-r--r--lib/MDK/Common/System.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/MDK/Common/System.pm b/lib/MDK/Common/System.pm
index 7ff4e4c..1b24f21 100644
--- a/lib/MDK/Common/System.pm
+++ b/lib/MDK/Common/System.pm
@@ -338,12 +338,12 @@ sub getVarsFromSh {
open(my $F, $_[0]) or return;
local $_;
while (<$F>) {
- s/#.*//; # remove comments
+ s/^\s*#.*//; # remove comment-only lines
s/^\s*//; # leading space
my ($v, $val) = /^(\w+)=(.*)/ or next;
- if ($val =~ /^"(.*)"$/) {
+ if ($val =~ /^"(.*)"(\s+#.*)?$/) {
$val = $1;
- } elsif ($val =~ /^'(.*)'$/) {
+ } elsif ($val =~ /^'(.*)'(\s+#.*)?$/) {
$val = $1;
$val =~ s/(^|[^'])'\\''/$1'/g;
}
0131b4ed391bc32cffd656ba81'>25d3d7e5f8d1270131b4ed391bc32cffd656ba81 (diff)downloaddrakx-6c70d760f5b8cee14261dd8e5af9fbaa1bdc8545.tar
drakx-6c70d760f5b8cee14261dd8e5af9fbaa1bdc8545.tar.gz
drakx-6c70d760f5b8cee14261dd8e5af9fbaa1bdc8545.tar.bz2
drakx-6c70d760f5b8cee14261dd8e5af9fbaa1bdc8545.tar.xz
drakx-6c70d760f5b8cee14261dd8e5af9fbaa1bdc8545.zip
simplify
Diffstat (limited to 'perl-install/share')
-rw-r--r--perl-install/share/rpmsrate5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/share/rpmsrate b/perl-install/share/rpmsrate
index 4c710be9f..20da230a0 100644
--- a/perl-install/share/rpmsrate
+++ b/perl-install/share/rpmsrate
@@ -621,8 +621,9 @@ CAT_X
LOCALES"ko" fonts-ttf-korean
LOCALES"ta" fonts-ttf-tamil fonts-ttf-tscii fonts-bitmap-tscii
LOCALES"th" fonts-ttf-thai
- LOCALES"zh_CN" || LOCALES"zh" fonts-ttf-chinese fonts-ttf-gb2312
- LOCALES"zh_TW" || LOCALES"zh" taipeifonts fonts-ttf-chinese fonts-ttf-big5
+ LOCALES"zh" fonts-ttf-chinese
+ LOCALES"zh_CN" fonts-ttf-gb2312
+ LOCALES"zh_TW" taipeifonts fonts-ttf-big5
DOCS
5 man info man-pages