diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-04-16 14:47:58 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-04-16 14:47:58 +0000 |
commit | ded11903939ba97961246791a85bcc4aa70c13a4 (patch) | |
tree | bfb26fc4548efa8494075911869fb534418e1d3d | |
parent | 5174919dc1d71e0cbebab384ec651b666892c0d5 (diff) | |
download | rpmdrake-ded11903939ba97961246791a85bcc4aa70c13a4.tar rpmdrake-ded11903939ba97961246791a85bcc4aa70c13a4.tar.gz rpmdrake-ded11903939ba97961246791a85bcc4aa70c13a4.tar.bz2 rpmdrake-ded11903939ba97961246791a85bcc4aa70c13a4.tar.xz rpmdrake-ded11903939ba97961246791a85bcc4aa70c13a4.zip |
- fix /me sux breaking the "sorry this package can't be selected"
in -16mdk, when trying to select a package that conflicts with
a previously selected
- add urpmi reasons when "sorry this package can't be selected"
-rwxr-xr-x | rpmdrake | 14 | ||||
-rw-r--r-- | rpmdrake.spec | 4 |
2 files changed, 16 insertions, 2 deletions
@@ -415,8 +415,16 @@ or you already installed all of them.")); slow_func($tree->window, sub { $urpm->resolve_requested(db(), $urpm->{state}, { map { $pkgs->{$_}{pkg}->id => 1 } @nodes }, callback_choices => $callback_choices, no_flag_update => 1, keep_state => 1) }); + my @conflict; my $pkg_sel_after_selection = sub { - @nodes_with_deps = map { my_fullname($urpm->{depslist}[$_]) } keys %{$urpm->{state}{selected}}; + if (%{$urpm->{state}{ask_unselect} || {}}) { + foreach my $p (keys %{$urpm->{state}{ask_unselect}}) { + push @conflict, [ my_fullname($urpm->{depslist}[$p]), + [ map { my_fullname($urpm->{depslist}[$_]) } keys %{$urpm->{state}{ask_unselect}{$p}} ] ]; + } + delete @{$urpm->{state}{selected}}{keys %{delete $urpm->{state}{ask_unselect}}}; + } + @nodes_with_deps = map { my_fullname($urpm->{depslist}[$_]) } keys %{$urpm->{state}{selected}}; }; $pkg_sel_after_selection->(); if (!$deps_msg->(N("Additional packages needed"), @@ -434,7 +442,9 @@ or you already installed all of them.")); $pkg_sel_after_selection->(); if (my @cant = difference2(\@nodes, \@nodes_with_deps)) { interactive_msg_(N("Some packages can't be installed"), - N("Sorry, the following package(s) can't be selected:\n\n") . $formatlistpkg->(@cant)); + N("Sorry, the following package(s) can't be selected:\n\n%s\n\nReasons follow:\n\n%s", + $formatlistpkg->(@cant), + join '', map { N("%s conflicts with %s", $_->[0], join(', ', @{$_->[1]})) } @conflict)); foreach (@cant) { $pkgs->{$_}{pkg}->set_flag_requested(0); $pkgs->{$_}{pkg}->set_flag_required(0); diff --git a/rpmdrake.spec b/rpmdrake.spec index 983cf8c6..3db0422c 100644 --- a/rpmdrake.spec +++ b/rpmdrake.spec @@ -119,6 +119,10 @@ rm -rf $RPM_BUILD_ROOT * Wed Apr 16 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-17mdk - fix drakhelp zombie process (thx titi) - More infos -> More info thx David Walser +- fix /me sux breaking the "sorry this package can't be selected" + in -16mdk, when trying to select a package that conflicts with + a previously selected +- add urpmi reasons when "sorry this package can't be selected" * Tue Apr 15 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-16mdk - update for urpmi-4.3 (skipped packages should be better handled |