summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-02-06 15:52:56 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-02-06 15:52:56 +0000
commit8b818523776b35a82162aadabf2a002ebdadce0d (patch)
tree3870d4a2712e9d1d7a8c99b2a2a788f239c9a2ce /urpm.pm
parentf06add5b1df163b79b54a4fe96c8815ea40b7782 (diff)
downloadurpmi-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)
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm19
1 files changed, 5 insertions, 14 deletions
diff --git a/urpm.pm b/urpm.pm
index 1e17460d..e1c4ecef 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -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;
}
}
}