summaryrefslogtreecommitdiffstats
path: root/urpm/install.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/install.pm')
-rw-r--r--urpm/install.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/urpm/install.pm b/urpm/install.pm
index 9630f444..9bf6c448 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -168,7 +168,15 @@ sub install {
$options{callback_uninst} = sub {
my ($_urpm, undef, undef, $subtype) = @_;
if ($subtype eq 'start') {
- print N("removing package %s", $trans->Element_name($index)), "\n" if $::verbose >= 0;
+ my ($name, $fullname) = ($trans->Element_name($index), $trans->Element_fullname($index));
+ my @previous = map { $trans->Element_name($_) } 0 .. ($index - 1);
+ # looking at previous packages in transaction
+ # we should be looking only at installed packages, but it should not give a different result
+ if (member($name, @previous)) {
+ $urpm->{log}("removing upgraded package $fullname");
+ } else {
+ print N("removing package %s", $fullname), "\n" if $::verbose >= 0;
+ }
$index++;
}
};