From 987fa75b771b75c23c7945cd0504cc5a62205b44 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 24 Apr 2003 22:12:14 +0000 Subject: cache management. --- urpm.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/urpm.pm b/urpm.pm index 08ffce0c..1b9877fd 100644 --- a/urpm.pm +++ b/urpm.pm @@ -2229,6 +2229,9 @@ sub get_source_packages { #- this is an invalid file in cache, remove it and ignore it. #- or clean options has been given meaning ignore any file in cache #- remove it too. + #- if a continue to download feature is used, the file should not be + #- removed and the transfer should continue, if it fails again, try + #- again from beginning ? unlink $filepath; } } #- do not examine rpm file in cache that will not be used. @@ -2474,7 +2477,8 @@ sub download_source_packages { #- necessary to keep track of failing download in order to #- present the error to the user. foreach (keys %distant_sources) { - -s $sources{$_} or $error_sources{$_} = delete $sources{$_}; + -s $sources{$_} && URPM::verify_rpm($sources{$_}, nogpg => 1, nopgp => 1) =~ /md5 OK/ or + $error_sources{$_} = delete $sources{$_}; } } } -- cgit v1.2.1