aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrpmdrake19
-rw-r--r--rpmdrake.spec6
2 files changed, 14 insertions, 11 deletions
diff --git a/rpmdrake b/rpmdrake
index 5d216653..3e1a3d67 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -540,11 +540,15 @@ or you already installed all of them."));
goto packages_selection_ok;
}
- if (my @cant = difference2(\@nodes, \@nodes_with_deps)) {
+ if (my @cant = sort(difference2(\@nodes, \@nodes_with_deps))) {
+ my @ask_unselect = $urpm->unselected_packages($urpm->{state});
+ my @reasons = map {
+ my $cant = $_;
+ my $unsel = find { remove_arch($_) eq $cant } @ask_unselect;
+ $unsel ? $urpm->translate_why_unselected($urpm->{state}, $unsel) : $cant;
+ } @cant;
interactive_msg_(N("Some packages can't be installed"),
- N("Sorry, the following package(s) can't be selected:\n\n%s\n\nReasons follow:\n\n%s",
- $formatlistpkg->(@cant),
- "(waiting for urpmi subroutine)"));
+ N("Sorry, the following package(s) can't be selected:\n\n%s", join("\n", @reasons)));
foreach (@cant) {
$pkgs->{$_}{pkg}->set_flag_requested(0);
$pkgs->{$_}{pkg}->set_flag_required(0);
@@ -795,16 +799,13 @@ Do you really want to install all the selected packages?"), yesno => 1)
or return;
}
if ($MODE ne 'remove') {
- @{$urpm->{ask_remove}} = grep { $urpm->{state}{rejected}{$_}{removed}
- && !$urpm->{state}{rejected}{$_}{obsoleted} } keys %{$urpm->{state}{rejected} || {}};
+ @{$urpm->{ask_remove}} = sort $urpm->removed_packages($urpm->{state});
@{$urpm->{ask_remove}} and (interactive_msg_(N("Some packages need to be removed"),
N("The following packages have to be removed for others to be upgraded:
%s
-(waiting for urpmi subroutine for explanation)
-
-Is it ok to continue?", $formatlistpkg->(sort { $a cmp $b } @{$urpm->{ask_remove}})), yesno => 1) or return);
+Is it ok to continue?", $urpm->translate_why_removed($urpm->{state}, @{$urpm->{ask_remove}})), yesno => 1) or return);
}
if (!$callback_action->($urpm, $pkgs)) {
($urpm, $pkgs, $descriptions) = $pkgs_provider->({ skip_updating_mu => 1 });
diff --git a/rpmdrake.spec b/rpmdrake.spec
index 09020079..2739196c 100644
--- a/rpmdrake.spec
+++ b/rpmdrake.spec
@@ -16,7 +16,7 @@ Release: %{release}
License: GPL
Source0: rpmdrake.tar.bz2
Summary: Mandrake Linux graphical front end for choosing packages for installion/removal
-Requires: perl-MDK-Common >= 1.0.4-13mdk gurpmi >= 4.3-9mdk perl-URPM >= 0.90-7mdk drakxtools >= 9.2-0.6mdk rpmtools >= 4.5
+Requires: perl-MDK-Common >= 1.0.4-13mdk urpmi >= 4.3-15mdk gurpmi >= 4.3-9mdk perl-URPM >= 0.90-7mdk drakxtools >= 9.2-0.6mdk rpmtools >= 4.5
Requires: perl-GTK2 > 0.0.cvs.2003.02.12.1-2mdk perl-Locale-gettext >= 1.01-7mdk
BuildRequires: libcurl2-devel >= 7.10.3-2mdk gettext openssl-devel perl-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
@@ -99,8 +99,10 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorarch}/*.pm
%changelog
-* Wed Jun 11 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-24mdk
+* Wed Jun 18 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-24mdk
- new ugtk2.pm API
+- use urpmi reporting reasons for impossibility to select some
+ packages, and for needing to remove some
* Fri Jun 6 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-23mdk
- rpmdrake: at install time, when some local files are impossible