aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-10-26 10:53:30 +0000
committerThierry Vignaud <tv@mandriva.org>2006-10-26 10:53:30 +0000
commit8bb2ee6bc13e1d41579330c2e5b2e45334d0a08f (patch)
tree1d52914d85cb5347ff1071e5bb83730dec6d8f4a
parentce90bf153f80edefa773058795b2d017cdcdc99a (diff)
downloadrpmdrake-8bb2ee6bc13e1d41579330c2e5b2e45334d0a08f.tar
rpmdrake-8bb2ee6bc13e1d41579330c2e5b2e45334d0a08f.tar.gz
rpmdrake-8bb2ee6bc13e1d41579330c2e5b2e45334d0a08f.tar.bz2
rpmdrake-8bb2ee6bc13e1d41579330c2e5b2e45334d0a08f.tar.xz
rpmdrake-8bb2ee6bc13e1d41579330c2e5b2e45334d0a08f.zip
(toggle_nodes) if one package cannot be removed, do not alter "selected"
status for other packages in the loop
-rwxr-xr-xrpmdrake8
1 files changed, 6 insertions, 2 deletions
diff --git a/rpmdrake b/rpmdrake
index 397624ee..6b189675 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -1079,8 +1079,12 @@ or you already installed all of them."));
#- some deps may exist on some packages which aren't listed because
#- not upgradable (older than what currently installed)
exists $pkgs->{$_} or next;
- $pkgs->{$_}{pkg} or $new_state = 0; #- can't be removed
- $pkgs->{$_}{selected} = $new_state;
+ if (!$pkgs->{$_}{pkg}) { #- can't be removed # FIXME; what about next packages in the loop?
+ $pkgs->{$_}{selected} = 0;
+ log::explanations("can't be removed: $_");
+ } else {
+ $pkgs->{$_}{selected} = $new_state;
+ }
$set_state->($_, $options->{node_state}($_), $detail_tree_model);
$pkgs->{$_}{pkg}
and $size_selected += $pkgs->{$_}{pkg}->size * ($new_state ? 1 : -1);