summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-27 10:05:56 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-27 10:05:56 +0000
commitcdb6e75eb7121b79a8ff534d701d48d529fbe042 (patch)
treebdcc786c53a0cffa03e02ef8f1c5761216562395 /urpm.pm
parent68258b087964a1dfd272be12f8aa2b7ea4c36642 (diff)
downloadurpmi-cdb6e75eb7121b79a8ff534d701d48d529fbe042.tar
urpmi-cdb6e75eb7121b79a8ff534d701d48d529fbe042.tar.gz
urpmi-cdb6e75eb7121b79a8ff534d701d48d529fbe042.tar.bz2
urpmi-cdb6e75eb7121b79a8ff534d701d48d529fbe042.tar.xz
urpmi-cdb6e75eb7121b79a8ff534d701d48d529fbe042.zip
Fail earlier and more aggressively when downloading an rpm fails
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm6
1 files changed, 5 insertions, 1 deletions
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;
}