diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-02-06 15:52:56 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-02-06 15:52:56 +0000 |
commit | 8b818523776b35a82162aadabf2a002ebdadce0d (patch) | |
tree | 3870d4a2712e9d1d7a8c99b2a2a788f239c9a2ce | |
parent | f06add5b1df163b79b54a4fe96c8815ea40b7782 (diff) | |
download | urpmi-8b818523776b35a82162aadabf2a002ebdadce0d.tar urpmi-8b818523776b35a82162aadabf2a002ebdadce0d.tar.gz urpmi-8b818523776b35a82162aadabf2a002ebdadce0d.tar.bz2 urpmi-8b818523776b35a82162aadabf2a002ebdadce0d.tar.xz urpmi-8b818523776b35a82162aadabf2a002ebdadce0d.zip |
Always remove from the local cache all packages that were part of the
transaction, even if they weren't successfully installed. (Bug #17913)
-rw-r--r-- | urpm.pm | 19 |
1 files changed, 5 insertions, 14 deletions
@@ -2154,7 +2154,6 @@ sub _findindeps { sub search_packages { my ($urpm, $packages, $names, %options) = @_; my (%exact, %exact_a, %exact_ra, %found, %foundi); - $urpm->{log}(N("Search")); foreach my $v (@$names) { my $qv = quotemeta $v; $qv = '(?i)' . $qv if $options{caseinsensitive}; @@ -3022,19 +3021,11 @@ sub install { } @l = $trans->run($urpm, %options); - #- in case of error or testing, do not try to check rpmdb - #- for packages being upgraded or not. - unless (@l || $options{test}) { - #- examine the local repository to delete package which have been installed. - if ($options{post_clean_cache}) { - foreach (keys %$install, keys %$upgrade) { - my $pkg = $urpm->{depslist}[$_]; - $db->traverse_tag('name', [ $pkg->name ], sub { - my ($p) = @_; - $p->fullname eq $pkg->fullname or return; - unlink "$urpm->{cachedir}/rpms/" . $pkg->filename; - }); - } + if (!$options{test} && $options{post_clean_cache}) { + #- examine the local cahe to delete packages which were part of this transaction + foreach (keys %$install, keys %$upgrade) { + my $pkg = $urpm->{depslist}[$_]; + unlink "$urpm->{cachedir}/rpms/" . $pkg->filename; } } } |