summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/solver.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/solver.c b/src/solver.c
index 3943bad..e7b1afb 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -971,8 +971,15 @@ static int next_branch(struct apk_solver_state *ss)
d->name->ss.backjump_enabled = 0;
backjump_name = NULL;
}
- if (d->backup_until && backup_until > d->backup_until)
+ if (d->backup_until && d->backup_until < backup_until) {
backup_until = d->backup_until;
+ /* We can't backtrack over the immediate
+ * EXCLUDE decisions, as they are in a sense
+ * part of the bundle. */
+ while (backup_until < ss->num_decisions &&
+ !ss->decisions[backup_until+1].has_package)
+ backup_until++;
+ }
}
ss->num_decisions--;