diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-05-09 16:24:59 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-05-09 16:24:59 +0000 |
commit | d95f2d4240851529416ab1e2144f8068527d87b8 (patch) | |
tree | faa0a9fded2d339a265145613ab494e0525aae6c /urpm | |
parent | ac8a12fea21114240235dc29c9d483ed70e4af15 (diff) | |
download | urpmi-d95f2d4240851529416ab1e2144f8068527d87b8.tar urpmi-d95f2d4240851529416ab1e2144f8068527d87b8.tar.gz urpmi-d95f2d4240851529416ab1e2144f8068527d87b8.tar.bz2 urpmi-d95f2d4240851529416ab1e2144f8068527d87b8.tar.xz urpmi-d95f2d4240851529416ab1e2144f8068527d87b8.zip |
- urpmi
o display "removing package ..." when removing an obsolete or conflicting
package (need perl-URPM 1.63), and not before
o in verbose mode, display "removing upgraded package ..."
(should make it more understandable by users)
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/install.pm | 10 |
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++; } }; |