diff options
Diffstat (limited to 'urpm/install.pm')
-rw-r--r-- | urpm/install.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/urpm/install.pm b/urpm/install.pm index e78f80a9..334555ce 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -176,10 +176,9 @@ sub install { #- 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}[$_]; - unlink "$urpm->{cachedir}/rpms/" . $pkg->filename; - } + my @pkgs = map { $urpm->{depslist}[$_]->filename } keys %$install, keys %$upgrade; + $urpm->{log}(N("removing installed rpms (%s) from %s", join(' ', @pkgs), "$urpm->{cachedir}/rpms")); + unlink "$urpm->{cachedir}/rpms/$_" foreach @pkgs; } if ($::verbose >= 0) { |