diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-08 18:50:53 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-08 18:50:53 +0000 |
commit | fcb66a9dc4ce089f8f39dfb90a16486786c06623 (patch) | |
tree | 6df2bcb0fab1ae650cdf7298a1549dd094fa2df4 | |
parent | 58779dead791a82692fe652471d0688124a18cac (diff) | |
download | urpmi-fcb66a9dc4ce089f8f39dfb90a16486786c06623.tar urpmi-fcb66a9dc4ce089f8f39dfb90a16486786c06623.tar.gz urpmi-fcb66a9dc4ce089f8f39dfb90a16486786c06623.tar.bz2 urpmi-fcb66a9dc4ce089f8f39dfb90a16486786c06623.tar.xz urpmi-fcb66a9dc4ce089f8f39dfb90a16486786c06623.zip |
(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)
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | urpm/main_loop.pm | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -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; } } } |