From 5cc84694c17bca3e71b8955cdb5fabc47f031020 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 30 Jan 2009 10:36:48 +0000 Subject: (get_media_cfg) drop support for parsing the "media_info/hdlists" file (obsolete since using media.cfg) --- perl-install/install/NEWS | 1 + perl-install/install/media.pm | 27 +-------------------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index a1bf93f74..76cf05cd4 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -4,6 +4,7 @@ - include mke2fs.conf from e2fsprogs-1.41.3-3mdb - media management: o better layout for DVD/CD copy + o drop support for parsing the "media_info/hdlists" file Version 11.80.1 - 21 January 2008 diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm index 2145dab24..091d93743 100644 --- a/perl-install/install/media.pm +++ b/perl-install/install/media.pm @@ -495,29 +495,6 @@ sub parse_media_cfg { $distribconf, \@hdlists; } -sub parse_hdlists { - my ($cfg) = @_; - - my (%main_options, @hdlists); - foreach (cat_($cfg)) { - chomp; - s/\s*#.*$//; - /^\s*$/ and next; - #- we'll ask afterwards for supplementary CDs, if the hdlists file contains - #- a line that begins with "suppl" - if (/^suppl/) { $main_options{suppl} = 1; next } - #- if the hdlists contains a line "askmedia", deletion of media found - #- in this hdlist is allowed - if (/^askmedia/) { $main_options{askmedia} = 1; next } - my ($noauto, $hdlist, $rpmsdir, $name, $size) = m!^\s*(noauto:)?(hdlist\S*\.cz)\s+[^/]*/(\S+)\s*([^(]*)(?:\((.+)\))?$! - or die qq(invalid hdlist description "$_" in hdlists file); - $name =~ s/\s+$//; - $size =~ s/MB?$//i; - push @hdlists, { rel_hdlist => "media_info/$hdlist", rpmsdir => $rpmsdir, name => $name, selected => !$noauto, size => $size }; - } - (\%main_options, \@hdlists); -} - sub get_media { my ($o, $media, $packages) = @_; @@ -633,9 +610,7 @@ sub get_media_cfg { if (getAndSaveFile_($phys_medium, 'media_info/media.cfg', '/tmp/media.cfg')) { ($distribconf, $hdlists) = parse_media_cfg('/tmp/media.cfg'); } else { - getAndSaveFile_($phys_medium, 'media_info/hdlists', '/tmp/hdlists') - or die "media.cfg not found"; - ($distribconf, $hdlists) = parse_hdlists('/tmp/hdlists'); + die "media.cfg not found"; } if (defined $selected_names) { -- cgit v1.2.1