From 14977dfca93c0be0e62bb2a29edb07317efb808d Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 18 Feb 2009 14:23:05 +0000 Subject: (get_media_cfg) drop support for parsing the "media_info/hdlists" file (obsolete since using media.cfg) --- perl-install/install/NEWS | 3 +++ perl-install/install/media.pm | 27 +-------------------------- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 001c1f1b1..bd82ca93a 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,6 @@ +- media management: + o drop support for parsing the "media_info/hdlists" file + Version 11.89 - 17 February 2009 - enable having /boot as ext4 diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm index bd0e2503a..ff0f4247a 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