From 3138f5124242eff0724f30c09317c14260e4083b Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 2 Mar 2009 13:59:15 +0000 Subject: (get_medium) do not download and use hdlists anymore ; only use smaller synthesis files --- perl-install/install/NEWS | 1 + perl-install/install/media.pm | 16 ++-------------- 2 files changed, 3 insertions(+), 14 deletions(-) (limited to 'perl-install/install') diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index bd82ca93a..92c828471 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,5 +1,6 @@ - media management: o drop support for parsing the "media_info/hdlists" file + o do not download and use hdlists anymore ; only use smaller synthesis files Version 11.89 - 17 February 2009 diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm index a319db962..9dc74a6c2 100644 --- a/perl-install/install/media.pm +++ b/perl-install/install/media.pm @@ -666,20 +666,11 @@ sub _get_medium { log::l("trying to read $m->{rel_hdlist} for medium '$m->{fakemedium}'"); - #- copy hdlist file directly to urpmi directory, this will be used - #- for getting header of package during installation. - my $hdlist = hdlist_on_disk($m); - { - _getAndSaveFile_progress($in_wait, N("Downloading file %s...", $m->{rel_hdlist}), - $phys_m, $m->{rel_hdlist}, $hdlist) or die "no $m->{rel_hdlist} found"; - - } - + #- copy synthesis file directly to urpmi directory. my $synthesis = urpmidir() . "/synthesis.hdlist.$m->{fakemedium}.cz"; { my $rel_synthesis = $m->{rel_hdlist}; $rel_synthesis =~ s!/hdlist!/synthesis.hdlist! or internal_error("bad {rel_hdlist} $m->{rel_hdlist}"); - #- copy existing synthesis file too. _getAndSaveFile_progress($in_wait, N("Downloading file %s...", $rel_synthesis), $phys_m, $rel_synthesis, $synthesis); } @@ -717,16 +708,13 @@ sub _get_medium { if (-s $synthesis) { ($m->{start}, $m->{end}) = $packages->parse_synthesis($synthesis, callback => $callback) or $error = "bad synthesis $synthesis for $m->{fakemedium}"; - } elsif (-s $hdlist) { - ($m->{start}, $m->{end}) = $packages->parse_hdlist($hdlist, callback => $callback) - or $error = "bad hdlist $hdlist for $m->{fakemedium}"; } else { $error = "fatal: no hdlist nor synthesis to read for $m->{fakemedium}"; } if ($error) { pop @{$packages->{media}}; - unlink $hdlist, $synthesis; + unlink $synthesis; die $error; } else { log::l("medium " . phys_medium_to_string($phys_m) . ", read " . ($m->{end} - $m->{start} + 1) . " packages in $m->{rel_hdlist}, $nb_suppl_pkg_skipped skipped"); -- cgit v1.2.1