From 50b095fb226b64a7ccdfa5ad2d4df01464c511ab Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Thu, 29 Nov 2007 15:03:21 +0000 Subject: [PATCH] - prefer assertions to make coolo happy --- src/solver.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/solver.c b/src/solver.c index 9da4f98..866c58c 100644 --- a/src/solver.c +++ b/src/solver.c @@ -2941,6 +2941,7 @@ findproblemrule_internal(Solver *solv, Id idx, Id *reqrp, Id *conrp, Id *sysrp, Id rid; Id lreqr, lconr, lsysr, ljobr; Rule *r; + int reqassert = 0; lreqr = lconr = lsysr = ljobr = 0; while ((rid = solv->learnt_pool.elements[idx++]) != 0) @@ -2974,11 +2975,14 @@ findproblemrule_internal(Solver *solv, Id idx, Id *reqrp, Id *conrp, Id *sysrp, else { /* assertion, counts as require rule */ - /* system solvable doesn't count, as this is useful information */ + /* ignore system solvable as we need useful info */ if (rid == -SYSTEMSOLVABLE) continue; - if (!*reqrp) - *reqrp = rid; + if (!*reqrp || !reqassert) + { + *reqrp = rid; + reqassert = 1; + } } } if (!*reqrp && lreqr) -- 2.7.4