diff options
Diffstat (limited to 'rpmdrake')
-rwxr-xr-x | rpmdrake | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -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 }); |