diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-05-23 11:32:33 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-23 11:33:40 +0100 |
commit | 9490a5575320d06079f55869631f90ce80ecc6d3 (patch) | |
tree | 07e05cf34391fd0341c2092d3a518f6228531272 /solenv | |
parent | 197529947593132daf7a6e9dffa7c34e4203a393 (diff) |
further cleanup to tolerate DOS line endings.
Change-Id: I60345ed3eed84ef197bf145f2b26dfa8afdc51b1
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/modules/installer/control.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/solenv/bin/modules/installer/control.pm b/solenv/bin/modules/installer/control.pm index 67dd1931d7c9..a45ffcd3ffbc 100644 --- a/solenv/bin/modules/installer/control.pm +++ b/solenv/bin/modules/installer/control.pm @@ -431,8 +431,10 @@ sub read_lcidlist for ( my $i = 0; $i <= $#{$lcidlist}; $i++ ) { my $line = ${$lcidlist}[$i]; - - $line =~ s/\#.*$//; # removing comments after "#" + # de-mangle various potential DOS line-ending problems + $line =~ s/\r//g; + $line =~ s/\n//g; + $line =~ s/\s*\#.*$//; # removing comments after "#" if ( $line =~ /^\s*$/ ) { next; } # this is an empty line if ( $line =~ /^\s*([\w-]+)\s+(\d+)\s+(\d+)\s*$/ ) |