From 50033df4bc6e98b51717726310c3b349e25211a5 Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Sat, 7 Jan 2006 23:43:17 +0000 Subject: - Fix hdlists parsing for very old distro, because nobody took care about what they did --- lib/MDV/Distribconf.pm | 7 +++++-- 1 file 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) : ()) { -- cgit v1.2.1