aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-02 08:55:22 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-02 09:20:17 +0100
commit5a855797a4c045e76a6376f57844411e5ea27200 (patch)
treee43d8045fbfc74e1022e2f66fd7ae2528bb3b57b
parentd35c91148c7884064ed6bbcfb97ea5e57da854c6 (diff)
downloadpaludis-5a855797a4c045e76a6376f57844411e5ea27200.tar.gz
paludis-5a855797a4c045e76a6376f57844411e5ea27200.tar.xz
Decide nothings later on
-rw-r--r--paludis/resolver/decider.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index 2cdca19..0de2ebc 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -106,7 +106,7 @@ Decider::_resolve_decide_with_dependencies()
{
Context context("When resolving and adding dependencies recursively:");
- enum State { deciding_non_suggestions, deciding_suggestions, finished } state = deciding_non_suggestions;
+ enum State { deciding_non_suggestions, deciding_nothings, deciding_suggestions, finished } state = deciding_non_suggestions;
bool changed(true);
while (true)
{
@@ -127,7 +127,12 @@ Decider::_resolve_decide_with_dependencies()
/* we're only being suggested. don't do this on the first pass, so
* we don't have to do restarts for suggestions later becoming hard
* deps. */
- if (state == deciding_non_suggestions && (*i)->constraints()->all_untaken())
+ if (state < deciding_suggestions && (*i)->constraints()->all_untaken())
+ continue;
+
+ /* avoid deciding nothings until after we've decided things we've
+ * taken, so adding extra destinations doesn't get messy. */
+ if (state < deciding_nothings && (*i)->constraints()->nothing_is_fine_too())
continue;
_imp->env->trigger_notifier_callback(NotifierCallbackResolverStepEvent());