From: Michael Schroeder Date: Mon, 24 Nov 2008 14:24:28 +0000 (+0000) Subject: - remove no longer needed pattern check, log minimization steps X-Git-Tag: BASE-SuSE-Code-12_1-Branch~355 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c02c4906ce1544061591b10ddb23493756f154c3;p=platform%2Fupstream%2Flibsolv.git - remove no longer needed pattern check, log minimization steps --- diff --git a/src/policy.c b/src/policy.c index 9e7db50..0508715 100644 --- a/src/policy.c +++ b/src/policy.c @@ -51,18 +51,6 @@ prune_to_best_version_sortcmp(const void *ap, const void *bp) * is not depending on some random solvable order */ na = id2str(pool, sa->name); nb = id2str(pool, sb->name); - /* bring patterns to the front */ - /* XXX: no longer needed? */ - if (!strncmp(na, "pattern:", 8)) - { - if (strncmp(nb, "pattern:", 8)) - return -1; - } - else if (!strncmp(nb, "pattern:", 8)) - { - if (strncmp(na, "pattern:", 8)) - return 1; - } return strcmp(na, nb); } /* the same name, bring installed solvables to the front */ diff --git a/src/solver.c b/src/solver.c index 4154383..d9212ad 100644 --- a/src/solver.c +++ b/src/solver.c @@ -2456,6 +2456,7 @@ run_solver(Solver *solv, int disablerules, int doweak) Solvable *s; Pool *pool = solv->pool; Id p, *dp; + int minimizationsteps; IF_POOLDEBUG (SAT_DEBUG_RULE_CREATION) { @@ -2488,6 +2489,7 @@ run_solver(Solver *solv, int disablerules, int doweak) * with step 1 */ + minimizationsteps = 0; for (;;) { /* @@ -3000,6 +3002,7 @@ run_solver(Solver *solv, int disablerules, int doweak) p = solv->branches.elements[lasti]; solv->branches.elements[lasti] = 0; POOL_DEBUG(SAT_DEBUG_STATS, "minimizing %d -> %d with %s\n", solv->decisionmap[p], l, solvable2str(pool, pool->solvables + p)); + minimizationsteps++; level = lastl; revert(solv, level); @@ -3016,7 +3019,7 @@ run_solver(Solver *solv, int disablerules, int doweak) } break; } - POOL_DEBUG(SAT_DEBUG_STATS, "solver statistics: %d learned rules, %d unsolvable\n", solv->stats_learned, solv->stats_unsolvable); + POOL_DEBUG(SAT_DEBUG_STATS, "solver statistics: %d learned rules, %d unsolvable, %d minimization steps\n", solv->stats_learned, solv->stats_unsolvable, minimizationsteps); POOL_DEBUG(SAT_DEBUG_STATS, "done solving.\n\n"); queue_free(&dq);