summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm/main_loop.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm
index 22da242a..fdcff529 100644
--- a/urpm/main_loop.pm
+++ b/urpm/main_loop.pm
@@ -108,9 +108,16 @@ if ($urpm->{options}{'download-all'}) {
}
}
- my ($error_sources) = download_packages($blists, \%sources);
- if (@$error_sources) {
- return 10;
+ #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
+ foreach my $blist (@$blists) {
+ foreach my $pkg (keys %{$blist->{pkgs}}) {
+ my $blist_one = [{ pkgs => { $pkg => $blist->{pkgs}{$pkg} }, medium => $blist->{medium} }];
+ my ($error_sources) = download_packages($blist_one, \%sources);
+ if (@$error_sources) {
+ return 10;
+ }
+ }
}
}