diff options
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/get_pkgs.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm index 0068b95b..91afa3f8 100644 --- a/urpm/get_pkgs.pm +++ b/urpm/get_pkgs.pm @@ -108,8 +108,10 @@ sub selected2list { sub verify_partial_rpm_and_move { my ($urpm, $cachedir, $filename) = @_; - URPM::verify_rpm("$cachedir/partial/$filename", nosignatures => 1) or return; - + URPM::verify_rpm("$cachedir/partial/$filename", nosignatures => 1) or do { + unlink "$cachedir/partial/$filename"; + return; + }; #- it seems the the file has been downloaded correctly and has been checked to be valid. unlink "$cachedir/rpms/$filename"; urpm::sys::move_or_die($urpm, "$cachedir/partial/$filename", "$cachedir/rpms/$filename"); @@ -180,7 +182,6 @@ sub download_packages_of_distant_media { if (my $rpm = verify_partial_rpm_and_move($urpm, $cachedir, $filename)) { $sources->{$i} = $rpm; } else { - unlink "$cachedir/partial/$filename"; $errors{$i} = [ $distant_sources{$i}, 'bad' ]; } } else { |