diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2006-01-07 23:43:17 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2006-01-07 23:43:17 +0000 |
commit | 50033df4bc6e98b51717726310c3b349e25211a5 (patch) | |
tree | 6d9decdffa84ff6ff106364339b7a069840784c5 /lib/MDV/Distribconf.pm | |
parent | e7b6a74f65032e37493e2f3d44fefe72562e9126 (diff) | |
download | perl-MDV-Distribconf-50033df4bc6e98b51717726310c3b349e25211a5.tar perl-MDV-Distribconf-50033df4bc6e98b51717726310c3b349e25211a5.tar.gz perl-MDV-Distribconf-50033df4bc6e98b51717726310c3b349e25211a5.tar.bz2 perl-MDV-Distribconf-50033df4bc6e98b51717726310c3b349e25211a5.tar.xz perl-MDV-Distribconf-50033df4bc6e98b51717726310c3b349e25211a5.zip |
- Fix hdlists parsing for very old distro, because nobody took care about what they did
Diffstat (limited to 'lib/MDV/Distribconf.pm')
-rw-r--r-- | lib/MDV/Distribconf.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/MDV/Distribconf.pm b/lib/MDV/Distribconf.pm index 4837fad..0779db0 100644 --- a/lib/MDV/Distribconf.pm +++ b/lib/MDV/Distribconf.pm @@ -242,9 +242,12 @@ sub parse_hdlists { length or next; my ($options, %media); ($options, @media{qw/hdlist path name size/}) = /^\s*(?:(.*):)?(\S+)\s+(\S+)\s+([^(]*)(?:\s+\((\w+)\))?$/; + if (!$media{hdlist}) { # Hack because hdlists format really sucks + ($options, @media{qw/hdlist path name size/}) = /^\s*(?:(.*):)?(\S+)\s+(\S+)\s+(.*)$/; + } if ($options) { - $media{$_} = 1 foreach split /:/, $options; - } + $media{$_} = 1 foreach split /:/, $options; + } $media{name} =~ s/\s*$//; $media{path} =~ s!^$distrib->{mediadir}/+!!; foreach (qw/hdlist name size/, $options ? split(/:/, $options) : ()) { |