aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-09-13 09:56:28 +0000
committerThierry Vignaud <tv@mandriva.org>2006-09-13 09:56:28 +0000
commit5936cd77df3d343539eca60c8d1c5392f6c0b3f4 (patch)
tree842066b6954e9997e716f4cfe00c0b1d9a4b8c50
parentae995eac3513b57d701c1050a5a0371772bf6f15 (diff)
downloadrpmdrake-5936cd77df3d343539eca60c8d1c5392f6c0b3f4.tar
rpmdrake-5936cd77df3d343539eca60c8d1c5392f6c0b3f4.tar.gz
rpmdrake-5936cd77df3d343539eca60c8d1c5392f6c0b3f4.tar.bz2
rpmdrake-5936cd77df3d343539eca60c8d1c5392f6c0b3f4.tar.xz
rpmdrake-5936cd77df3d343539eca60c8d1c5392f6c0b3f4.zip
(perform_installation) fix uninstalling several packages (#25027)
-rwxr-xr-xrpmdrake10
1 files changed, 6 insertions, 4 deletions
diff --git a/rpmdrake b/rpmdrake
index 99d8027e..85381d29 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -1666,7 +1666,7 @@ sub dialog_rpmnew {
}
sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
- my ($urpm) = @_;
+ my ($urpm, $pkgs) = @_;
my $fatal_msg;
my @error_msgs;
@@ -1720,7 +1720,9 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
# FIXME: $_ is trashed:
my @pkgs = map { my $c = $_->fullname; $c } sort(grep { $_->flag_selected } @{$urpm->{depslist}});#{ $a->name cmp $b->name } @{$urpm->{depslist}}[keys %{$state->{selected}}];
@{$urpm->{ask_remove}} = sort $urpm->removed_packages($urpm->{state});
- my $r = join "\n", $urpm->translate_why_removed($urpm->{state}, @{$urpm->{ask_remove}});
+ my @to_remove = uniq(@{$urpm->{ask_remove}}, map { if_($pkgs->{$_}{selected}, $pkgs->{$_}{urpm_name}) } keys %$pkgs);
+ my $r = join "\n", $urpm->translate_why_removed($urpm->{state}, @to_remove);
+
my $to_install = N("To satisfy dependencies, the following %d packages are going to be installed:\n", int(@pkgs)) .
formatlistpkg(map { s!.*/!!; $_ } @pkgs);
interactive_msg_(N("Some packages need to be removed"),
@@ -1794,7 +1796,7 @@ Is it ok to continue?", $r . "\n\n" . $to_install) : $to_install),
}
}
- if (@rpms_install || @rpms_upgrade || @{$urpm->{ask_remove}}) {
+ if (@rpms_install || @rpms_upgrade || @to_remove) {
if (my @missing = grep { m|^/| && ! -e $_ } @rpms_install, @rpms_upgrade) {
interactive_msg_(
N("Installation failed"),
@@ -1824,7 +1826,7 @@ Is it ok to continue?", $r . "\n\n" . $to_install) : $to_install),
};
my $fh;
my @errors = $urpm->install(
- $urpm->{ask_remove},
+ \@to_remove,
\%sources_install,
\%sources,
translate_message => 1,