]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Split SOLV_DEBUG_WATCHES from SOLV_DEBUG_PROPAGATE
authorMichael Schroeder <mls@suse.de>
Tue, 5 Mar 2019 13:03:32 +0000 (14:03 +0100)
committerMichael Schroeder <mls@suse.de>
Tue, 5 Mar 2019 13:03:32 +0000 (14:03 +0100)
Looking at the watches move from literal to literal is tedious
and distracts from the interesting messages.

Also make the debug output a bit less noisy.

src/policy.c
src/pool.c
src/pool.h
src/solver.c

index 45c7357de71ee2e2881ee139d3c03e2d8baa51fa..5f6111520efd157e273c3eb92b4e8575adeffb63 100644 (file)
@@ -856,9 +856,9 @@ prune_to_best_version(Pool *pool, Queue *plist)
     {
       s = pool->solvables + plist->elements[i];
 
-      POOL_DEBUG(SOLV_DEBUG_POLICY, "- %s[%s]\n",
-                pool_solvable2str(pool, s),
-                (pool->installed && s->repo == pool->installed) ? "installed" : "not installed");
+      POOL_DEBUG(SOLV_DEBUG_POLICY, "- %s [%d]%s\n",
+                pool_solvable2str(pool, s), plist->elements[i], 
+                (pool->installed && s->repo == pool->installed) ? "I" : "");
 
       if (!best)               /* if no best yet, the current is best */
         {
index be6a4193baa6a1a7ef5193216c3dc820b523ef94..e5bf24e0d4f3c782990be0167df04cd42b0241a7 100644 (file)
@@ -1598,7 +1598,7 @@ pool_setdebuglevel(Pool *pool, int level)
   if (level > 2)
     mask |= SOLV_DEBUG_PROPAGATE;
   if (level > 3)
-    mask |= SOLV_DEBUG_RULE_CREATION;
+    mask |= SOLV_DEBUG_RULE_CREATION | SOLV_DEBUG_WATCHES;
   mask |= pool->debugmask & SOLV_DEBUG_TO_STDERR;      /* keep bit */
   pool->debugmask = mask;
 }
index 37583a15ffd67bf20af04ef7db6ca506f064d5ad..57b3da2a583c1f30b7610a6df9e40f5a9b48de13 100644 (file)
@@ -188,6 +188,7 @@ struct s_Pool {
 #define SOLV_DEBUG_JOB                 (1<<11)
 #define SOLV_DEBUG_SOLVER              (1<<12)
 #define SOLV_DEBUG_TRANSACTION         (1<<13)
+#define SOLV_DEBUG_WATCHES             (1<<14)
 
 #define SOLV_DEBUG_TO_STDERR           (1<<30)
 
index ad78327a87f7c2be9244c6c3ea3fe409e8a0eb24..68687aef042c9a1d104ead12e9c33e468410305b 100644 (file)
@@ -431,7 +431,7 @@ propagate(Solver *solv, int level)
   Id *decisionmap = solv->decisionmap;
   Id *watches = solv->watches + pool->nsolvables;   /* place ptr in middle */
 
-  POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "----- propagate -----\n");
+  POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "----- propagate level %d -----\n", level);
 
   /* foreach non-propagated decision */
   while (solv->propagate_index < solv->decisionq.count)
@@ -444,7 +444,7 @@ propagate(Solver *solv, int level)
        
       IF_POOLDEBUG (SOLV_DEBUG_PROPAGATE)
         {
-         POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "propagate for decision %d level %d\n", -pkg, level);
+         POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "propagate decision %d:", -pkg);
          solver_printruleelement(solv, SOLV_DEBUG_PROPAGATE, 0, -pkg);
         }
 
@@ -462,10 +462,10 @@ propagate(Solver *solv, int level)
              continue;
            }
 
-         IF_POOLDEBUG (SOLV_DEBUG_PROPAGATE)
+         IF_POOLDEBUG (SOLV_DEBUG_WATCHES)
            {
-             POOL_DEBUG(SOLV_DEBUG_PROPAGATE,"  watch triggered ");
-             solver_printrule(solv, SOLV_DEBUG_PROPAGATE, r);
+             POOL_DEBUG(SOLV_DEBUG_WATCHES, "  watch triggered ");
+             solver_printrule(solv, SOLV_DEBUG_WATCHES, r);
            }
 
          /*
@@ -532,12 +532,12 @@ propagate(Solver *solv, int level)
                   * if we found some p that is UNDEF or TRUE, move
                   * watch to it
                   */
-                 IF_POOLDEBUG (SOLV_DEBUG_PROPAGATE)
+                 IF_POOLDEBUG (SOLV_DEBUG_WATCHES)
                    {
                      if (p > 0)
-                       POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "    -> move w%d to %s\n", (pkg == r->w1 ? 1 : 2), pool_solvid2str(pool, p));
+                       POOL_DEBUG(SOLV_DEBUG_WATCHES, "    -> move w%d to %s\n", (pkg == r->w1 ? 1 : 2), pool_solvid2str(pool, p));
                      else
-                       POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "    -> move w%d to !%s\n", (pkg == r->w1 ? 1 : 2), pool_solvid2str(pool, -p));
+                       POOL_DEBUG(SOLV_DEBUG_WATCHES, "    -> move w%d to !%s\n", (pkg == r->w1 ? 1 : 2), pool_solvid2str(pool, -p));
                    }
 
                  *rp = *next_rp;
@@ -593,7 +593,7 @@ propagate(Solver *solv, int level)
        
     } /* while we have non-decided decisions */
 
-  POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "----- propagate end-----\n");
+  POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "----- propagate end -----\n");
 
   return 0;    /* all is well */
 }