summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xurpmi27
-rw-r--r--urpmi.spec5
2 files changed, 30 insertions, 2 deletions
diff --git a/urpmi b/urpmi
index 0c3b1378..3c0e45d7 100755
--- a/urpmi
+++ b/urpmi
@@ -386,7 +386,32 @@ if (%{$state->{ask_unselect} || {}}) {
}
if (%{$state->{ask_remove} || {}}) {
unless ($auto) {
- my $list = join "\n", sort { $a cmp $b } keys %{$state->{ask_remove}};
+ my $list = join "\n", map { my ($from) = keys %{$state->{ask_remove}{$_}{closure}};
+ my ($whyk) = keys %{$state->{ask_remove}{$_}{closure}{$from}};
+ my ($whyv) = $state->{ask_remove}{$_}{closure}{$from}{$whyk};
+ my $frompkg = $urpm->{depslist}[$from];
+ my $s;
+ for ($whyk) {
+ /old_requested/ and
+ $s .= _("in order to install %s", $frompkg ? $frompkg->fullname : $from);
+ /unsatisfied/ and do {
+ foreach (@$whyv) {
+ $s and $s .= ', ';
+ if (/([^\[\s]*)(?:\[\*\])?(?:\[|\s+)([^\]]*)\]?$/) {
+ $s .= _("due to unsatisfied %s", "$1 $2");
+ } else {
+ $s .= _("due to missing %s", $_);
+ }
+ }
+ };
+ /conflicts/ and
+ $s .= _("due to conflicts with %s", $whyv);
+ /unrequested/ and
+ $s .= _("unrequested");
+ }
+ #- now insert the reason if available.
+ $_ . ($s ? " ($s)" : '');
+ } sort { $a cmp $b } keys %{$state->{ask_remove}};
my $msg = _("The following packages have to be removed for others to be upgraded:\n%s\ndo you agree ?", $list);
if ($X) {
my $ok = _("Ok");
diff --git a/urpmi.spec b/urpmi.spec
index f177d38f..2fa590c1 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 4.2
-Release: 4mdk
+Release: 5mdk
License: GPL
Source0: %{name}.tar.bz2
Source1: %{name}.logrotate
@@ -205,6 +205,9 @@ fi
%changelog
+* Fri Jan 10 2003 François Pons <fpons@mandrakesoft.com> 4.2-5mdk
+- added a reason for each removed package.
+
* Wed Jan 8 2003 François Pons <fpons@mandrakesoft.com> 4.2-4mdk
- updated english man pages and french version of urpmi.