From: Michael Schroeder Date: Fri, 3 Nov 2017 11:01:34 +0000 (+0100) Subject: Some little tweaks X-Git-Tag: 0.6.31~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99ee6531da1097142902f74e3dc1c34798e57370;p=thirdparty%2Flibsolv.git Some little tweaks --- diff --git a/src/problems.c b/src/problems.c index 29d51705..9d17d284 100644 --- a/src/problems.c +++ b/src/problems.c @@ -66,7 +66,7 @@ solver_disableproblem(Solver *solv, Id v) jp = solv->ruletojob.elements; if (solv->bestrules_pkg) { - int ni = solv->bestrules_end - solv->bestrules; + int ni = solv->bestrules_up - solv->bestrules; for (i = 0; i < ni; i++) { int j = solv->bestrules_pkg[i]; @@ -133,7 +133,7 @@ solver_enableproblem(Solver *solv, Id v) jp = solv->ruletojob.elements; if (solv->bestrules_pkg) { - int ni = solv->bestrules_end - solv->bestrules; + int ni = solv->bestrules_up - solv->bestrules; for (i = 0; i < ni; i++) { int j = solv->bestrules_pkg[i]; diff --git a/src/solver.c b/src/solver.c index 42aec825..a46c3cfe 100644 --- a/src/solver.c +++ b/src/solver.c @@ -194,9 +194,6 @@ makeruledecisions(Solver *solv, int disablerules) if (solv->decisionq.elements[i] == -v) break; assert(i < solv->decisionq.count); /* assert that we found it */ - oldproblemcount = solv->problems.count; - queue_push(&solv->problems, 0); - if (v == -SYSTEMSOLVABLE) ori = 0; else @@ -206,11 +203,14 @@ makeruledecisions(Solver *solv, int disablerules) } /* - * conflict with system solvable or pkg rule? - */ + * record the problem + */ doautouninstall = 0; + oldproblemcount = solv->problems.count; + queue_push(&solv->problems, 0); /* start problem */ if (ori < solv->pkgrules_end) { + /* easy: conflict with system solvable or pkg rule */ assert(v > 0 || v == -SYSTEMSOLVABLE); IF_POOLDEBUG (SOLV_DEBUG_UNSOLVABLE) { @@ -251,8 +251,9 @@ makeruledecisions(Solver *solv, int disablerules) doautouninstall = 1; } } - queue_push(&solv->problems, 0); + queue_push(&solv->problems, 0); /* finish problem */ + /* try autouninstall if requested */ if (doautouninstall) { if (solv->allowuninstall || solv->allowuninstall_all || solv->allowuninstallmap.size) @@ -333,7 +334,7 @@ makeruledecisions(Solver *solv, int disablerules) if (ii == solv->ruleassertions.count) break; /* finished! */ } - return 1; + return 1; /* the new level */ }