From d3185ee5a8ef16be330515d39af59703af991d4e Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 2 Mar 2006 14:53:26 +0000 Subject: Don't clear cache if transaction failed. --- urpm.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'urpm.pm') 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}[$_]; -- cgit v1.2.1