diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2004-02-12 20:57:57 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2004-02-12 20:57:57 +0000 |
commit | 33c7c332e7a23877b4f838aec120780954e48454 (patch) | |
tree | e96d9c107a4294c518668fd5209793c6f273c0a0 /rpmdrake | |
parent | 7554066ae61cabb1e8e1e40b4addc50b8d9d9348 (diff) | |
download | rpmdrake-33c7c332e7a23877b4f838aec120780954e48454.tar rpmdrake-33c7c332e7a23877b4f838aec120780954e48454.tar.gz rpmdrake-33c7c332e7a23877b4f838aec120780954e48454.tar.bz2 rpmdrake-33c7c332e7a23877b4f838aec120780954e48454.tar.xz rpmdrake-33c7c332e7a23877b4f838aec120780954e48454.zip |
fix #7675: rpmdrake-remove wrongly thought an unrelated package was
needed to remove another one because of closures trouble
Diffstat (limited to 'rpmdrake')
-rwxr-xr-x | rpmdrake | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -418,6 +418,7 @@ sub run_treeview_dialog { }; my $closure_removal = sub { my @to_remove; + $urpm->{state} = {}; foreach (@_) { $urpm->resolve_rejected(db(), $urpm->{state}, $pkgs->{$_}{pkg}, removed => 1); foreach (keys %{$urpm->{state}{rejected}}) { @@ -528,7 +529,6 @@ or you already installed all of them.")); } }; if ($MODE eq 'remove') { - $urpm->{state} = {}; if ($new_state) { my @remove; slow_func($tree->window, sub { @remove = $closure_removal->(@nodes) }); @@ -547,7 +547,8 @@ or you already installed all of them.")); } else { slow_func($tree->window, sub { @nodes_with_deps = grep { intersection(\@nodes, [ $closure_removal->($_) ]) } - grep { $pkgs->{$_}{selected} } keys %$pkgs }); + grep { $pkgs->{$_}{selected} && !member($_, @nodes) } keys %$pkgs }); + push @nodes_with_deps, @nodes; $deps_msg->(N("Some packages can't be removed"), N("Because of their dependencies, the following package(s) must be\nunselected now:\n\n"), \@nodes, \@nodes_with_deps) or @nodes_with_deps = (); |