summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-02 14:53:26 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-02 14:53:26 +0000
commitd3185ee5a8ef16be330515d39af59703af991d4e (patch)
tree1e083307e1d25864d7f053b24188264efd233dbe
parentf21277f1c25c14c2c8862f82adfed94635e52528 (diff)
downloadurpmi-d3185ee5a8ef16be330515d39af59703af991d4e.tar
urpmi-d3185ee5a8ef16be330515d39af59703af991d4e.tar.gz
urpmi-d3185ee5a8ef16be330515d39af59703af991d4e.tar.bz2
urpmi-d3185ee5a8ef16be330515d39af59703af991d4e.tar.xz
urpmi-d3185ee5a8ef16be330515d39af59703af991d4e.zip
Don't clear cache if transaction failed.
-rw-r--r--urpm.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index ca744c99..cef48974 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -3036,7 +3036,8 @@ sub install {
}
@l = $trans->run($urpm, %options);
- if (!$options{test} && $options{post_clean_cache}) {
+ #- don't clear cache if transaction failed. We might want to retry.
+ if (@l == 0 && !$options{test} && $options{post_clean_cache}) {
#- examine the local cache to delete packages which were part of this transaction
foreach (keys %$install, keys %$upgrade) {
my $pkg = $urpm->{depslist}[$_];