summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
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;
}
}
}