- remove no longer needed pattern check, log minimization steps
authorMichael Schroeder <mls@suse.de>
Mon, 24 Nov 2008 14:24:28 +0000 (14:24 +0000)
committerMichael Schroeder <mls@suse.de>
Mon, 24 Nov 2008 14:24:28 +0000 (14:24 +0000)
src/policy.c
src/solver.c

index 9e7db50ff06ff522e7de160ce067b4aaa13b362f..05087157eb747491f210fc69a332d499fbeaded4 100644 (file)
@@ -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 */
index 415438303bc1e2fe79994122f547cf252f233e1e..d9212ad2e5e7c33e91445a93ae0c7ac422a14a3c 100644 (file)
@@ -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);