diff options
author | Francois Pons <fpons@mandriva.com> | 2002-12-11 14:27:31 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-12-11 14:27:31 +0000 |
commit | d75e00d8f4ec0583bc5a5e3152fd4fbe140779e7 (patch) | |
tree | 8fb2a77491189075ba43626a2b4bf1315df79de0 /urpm.pm | |
parent | 4ecc11492e9490666f477b0de46ccef30fad855e (diff) | |
download | urpmi-d75e00d8f4ec0583bc5a5e3152fd4fbe140779e7.tar urpmi-d75e00d8f4ec0583bc5a5e3152fd4fbe140779e7.tar.gz urpmi-d75e00d8f4ec0583bc5a5e3152fd4fbe140779e7.tar.bz2 urpmi-d75e00d8f4ec0583bc5a5e3152fd4fbe140779e7.tar.xz urpmi-d75e00d8f4ec0583bc5a5e3152fd4fbe140779e7.zip |
4.1-13mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -1943,7 +1943,7 @@ sub get_source_packages { #- return a list of package ready for rpm. sub download_source_packages { my ($urpm, $local_sources, $list, %options) = @_; - my (%sources, %removables); + my (%sources, %error_sources, %removables); #- make sure everything is correct on input... @{$urpm->{media} || []} == @$list or return; @@ -2085,17 +2085,23 @@ sub download_source_packages { }; if ($@) { $urpm->{log}(_("...retrieving failed: %s", $@)); - delete @sources{keys %distant_sources}; + #delete @sources{keys %distant_sources}; } - #- clean files that have not been downloaded. + #- clean files that have not been downloaded, but keep mind there + #- has been problem downloading them at least once, this is + #- necessary to keep track of failing download in order to + #- present the error to the user. foreach (keys %distant_sources) { - -s $sources{$_} or delete $sources{$_}; + -s $sources{$_} or $error_sources{$_} = delete $sources{$_}; } } } + #- clean failed download which have succeeded. + delete @error_sources{keys %sources}; + #- return the hash of rpm file that have to be installed, they are all local now. - %$local_sources, %sources; + %$local_sources, %sources, %error_sources; } #- extract package that should be installed instead of upgraded, |