aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-23 16:00:21 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-23 16:01:12 +0100
commit322f4f6637e7dab4fcd1a99a807fe52093e6c3ce (patch)
treeb6f440b8f6814c19e64d150b16ad5d8201ccd8e3
parent6948b4d8ed0e48e7658c5f593e4940d2b9d00224 (diff)
downloadpaludis-322f4f6637e7dab4fcd1a99a807fe52093e6c3ce.tar.gz
paludis-322f4f6637e7dab4fcd1a99a807fe52093e6c3ce.tar.xz
nothing_no_change -> decision doesn't need a restart
-rw-r--r--paludis/resolver/resolver.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/paludis/resolver/resolver.cc b/paludis/resolver/resolver.cc
index fae5e11..0cf96a3 100644
--- a/paludis/resolver/resolver.cc
+++ b/paludis/resolver/resolver.cc
@@ -506,7 +506,24 @@ Resolver::_made_wrong_decision(const Resolvent & resolvent,
const std::tr1::shared_ptr<Decision> decision(_try_to_find_decision_for(resolvent, adapted_resolution));
if (decision)
- _suggest_restart_with(resolvent, resolution, constraint, decision);
+ {
+ switch (resolution->decision()->kind())
+ {
+ case dk_nothing_no_change:
+ /* going from nothing to something is safe */
+ resolution->decision() = decision;
+ break;
+
+ case dk_unable_to_decide:
+ case dk_changes_to_make:
+ case dk_existing_no_change:
+ _suggest_restart_with(resolvent, resolution, constraint, decision);
+ break;
+
+ case last_dk:
+ break;
+ }
+ }
else
resolution->decision() = _cannot_decide_for(resolvent, adapted_resolution);
}