summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-08 18:50:53 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-08 18:50:53 +0000
commitfcb66a9dc4ce089f8f39dfb90a16486786c06623 (patch)
tree6df2bcb0fab1ae650cdf7298a1549dd094fa2df4 /urpm
parent58779dead791a82692fe652471d0688124a18cac (diff)
downloadurpmi-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)
Diffstat (limited to 'urpm')
-rw-r--r--urpm/main_loop.pm3
1 files changed, 3 insertions, 0 deletions
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;
}
}
}