From 1ccf4ce7a3c700d06cde3d6228d6e93fdab075a6 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Sat, 17 Nov 2007 17:33:23 +0000 Subject: [PATCH] - move (disabled) into printrule - add back deleted line to fix loop - bring solver back into deterministic state after refining problems --- src/solver.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/solver.c b/src/solver.c index 1e64c51..c1a3211 100644 --- a/src/solver.c +++ b/src/solver.c @@ -116,8 +116,6 @@ printruleelement(Solver *solv, Rule *r, Id v) printf(" Install.level%d", solv->decisionmap[s - pool->solvables]); if (solv->decisionmap[s - pool->solvables] < 0) printf(" Conflict.level%d", -solv->decisionmap[s - pool->solvables]); - if (r && r->w1 == 0) - printf(" (disabled)"); printf("\n"); } @@ -133,9 +131,12 @@ printrule(Solver *solv, Rule *r) Id v; if (r >= solv->rules && r < solv->rules + solv->nrules) /* r is a solver rule */ - printf("Rule #%d:\n", (int)(r - solv->rules)); + printf("Rule #%d:", (int)(r - solv->rules)); else - printf("Rule:\n"); /* r is any rule */ + printf("Rule:"); /* r is any rule */ + if (r && r->w1 == 0) + printf(" (disabled)"); + printf("\n"); for (i = 0; ; i++) { if (i == 0) @@ -626,6 +627,8 @@ makeruledecisions(Solver *solv) printf("conflict with rpm rule, disabling rule #%d\n", ri); if (ri < solv->systemrules) v = -(solv->ruletojob.elements[ri - solv->jobrules] + 1); + else + v = ri; queue_push(&solv->problems, v); disableproblem(solv, v); queue_push(&solv->problems, 0); @@ -2579,6 +2582,10 @@ problems_to_solutions(Solver *solv, Queue *job) queue_free(&solv->problems); queue_clone(&solv->problems, &solutions); queue_free(&solutions); + + /* bring solver back into problem state */ + revert(solv, 1); /* XXX move to reset_solver? */ + reset_solver(solv); } -- 2.7.4