aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 13:56:29 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 14:55:18 +0000
commit6bff48083351b0fc0432b74815fc4dd9d1ae9b4c (patch)
treed7e6f0c1a9123d3c335dc8560cf3897c1801200b
parent9aa1f49c84aa09c6ff2a81a11f3fc42e16061dbd (diff)
downloadpaludis-6bff48083351b0fc0432b74815fc4dd9d1ae9b4c.tar.gz
paludis-6bff48083351b0fc0432b74815fc4dd9d1ae9b4c.tar.xz
Generate RemoveDecisions
-rw-r--r--paludis/resolver/decider.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index d2c70a3..f1b4f25 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -50,6 +50,7 @@
#include <paludis/version_requirements.hh>
#include <paludis/slot_requirement.hh>
#include <paludis/choice.hh>
+#include <paludis/action.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
@@ -1102,7 +1103,15 @@ Decider::_try_to_find_decision_for(
}
else if ((! existing_id) && (! installable_id))
{
- return make_null_shared_ptr();
+ /* we can't stick with our existing id, if there is one, and we can't
+ * fix it by installing things. this might be an error, or we might be
+ * able to remove things. */
+ if (_installed_but_allowed_to_remove(resolvent))
+ return make_shared_ptr(new RemoveDecision(
+ ! resolution->constraints()->all_untaken()
+ ));
+ else
+ return make_null_shared_ptr();
}
else if (existing_id && installable_id)
{