From fcb66a9dc4ce089f8f39dfb90a16486786c06623 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 8 Jun 2012 18:50:53 +0000 Subject: (run) fix downloading twice noarch packages on x86_64 with --download-all (mga#4867)) (w/o introducing testsuite regressions like previous fix) (reducing side effects to the download-all code) --- NEWS | 1 + urpm/main_loop.pm | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 606ee149..553d7ea4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +- fix testsuite regressions - urpmf: o fix -m option not showing media names (mga#5916) diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm index 21d992ca..5417b9ab 100644 --- a/urpm/main_loop.pm +++ b/urpm/main_loop.pm @@ -117,13 +117,16 @@ sub run { #download packages one by one so that we don't try to download them again #and again if the user has to restart urpmi because of some failure + my %downloaded_pkgs; foreach my $blist (@$blists) { foreach my $pkg (keys %{$blist->{pkgs}}) { + next if $downloaded_pkgs{$pkg}; my $blist_one = [{ pkgs => { $pkg => $blist->{pkgs}{$pkg} }, medium => $blist->{medium} }]; my ($error_sources) = &$download_packages($blist_one, \%sources); if (@$error_sources) { return 10; } + $downloaded_pkgs{$pkg} = 1; } } } -- cgit v1.2.1