diff options
author | Thierry Vignaud <tv@mandriva.org> | 2006-09-13 09:56:28 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2006-09-13 09:56:28 +0000 |
commit | 5936cd77df3d343539eca60c8d1c5392f6c0b3f4 (patch) | |
tree | 842066b6954e9997e716f4cfe00c0b1d9a4b8c50 | |
parent | ae995eac3513b57d701c1050a5a0371772bf6f15 (diff) | |
download | rpmdrake-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-x | rpmdrake | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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, |