aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-19 11:18:50 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-19 11:18:50 +0100
commitd590225911bc1a6ae54eff1f8c6dd30f0f8750b3 (patch)
tree160bc4b3b85de9ae9143ba57ce82ad574cfd65c6
parent5f73749a5fd82645c897e7f86d9e923b802852ce (diff)
downloadpaludis-d590225911bc1a6ae54eff1f8c6dd30f0f8750b3.tar.gz
paludis-d590225911bc1a6ae54eff1f8c6dd30f0f8750b3.tar.xz
Don't purge nonuninstallables
Fixes: ticket:924
-rw-r--r--paludis/resolver/decider.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index 13d65c3..5b365a7 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -1915,8 +1915,9 @@ Decider::purge()
{
_imp->env->trigger_notifier_callback(NotifierCallbackResolverStepEvent());
- if ((*i)->behaviours_key() && (*i)->behaviours_key()->value()->end() !=
- (*i)->behaviours_key()->value()->find("used"))
+ if (((*i)->behaviours_key() && (*i)->behaviours_key()->value()->end() !=
+ (*i)->behaviours_key()->value()->find("used")) ||
+ (! (*i)->supports_action(SupportsActionTest<UninstallAction>())))
continue;
Resolvent resolvent(*i, dt_install_to_slash);
@@ -2157,8 +2158,9 @@ Decider::_resolve_purges()
{
_imp->env->trigger_notifier_callback(NotifierCallbackResolverStepEvent());
- if ((*i)->behaviours_key() && (*i)->behaviours_key()->value()->end() !=
- (*i)->behaviours_key()->value()->find("used"))
+ if (((*i)->behaviours_key() && (*i)->behaviours_key()->value()->end() !=
+ (*i)->behaviours_key()->value()->find("used")) ||
+ (! (*i)->supports_action(SupportsActionTest<UninstallAction>())))
continue;
/* to catch packages being purged that are also in world and not used