From cdb6e75eb7121b79a8ff534d701d48d529fbe042 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 27 Oct 2005 10:05:56 +0000 Subject: Fail earlier and more aggressively when downloading an rpm fails --- urpm.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/urpm.pm b/urpm.pm index da2e2735..d655b861 100644 --- a/urpm.pm +++ b/urpm.pm @@ -2116,7 +2116,11 @@ sub register_rpms { $urpm->{log}(N("...retrieving done")); $_ = "$urpm->{cachedir}/partial/$basename"; }; - $@ and $urpm->{error}(N("...retrieving failed: %s", $@)); + if ($@) { + $urpm->{error}(N("...retrieving failed: %s", $@)); + unlink "$urpm->{cachedir}/partial/$basename"; + next; + } } else { -r $_ or $error = 1, $urpm->{error}(N("unable to access rpm file [%s]", $_)), next; } -- cgit v1.2.1