]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Use pool instread of solv->pool where we can
authorMichael Schroeder <mls@suse.de>
Thu, 22 Dec 2022 09:34:12 +0000 (10:34 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 22 Dec 2022 09:34:12 +0000 (10:34 +0100)
src/policy.c
src/rules.c
src/solver.c

index ddc3a43c8541afcbff0b9333285341f1cdb00b74..02548ea79cea927c47cebc5fb9758c673ad2bb2f 100644 (file)
@@ -232,13 +232,13 @@ check_complex_dep(Solver *solv, Id dep, Map *m, Queue **cqp)
 {
   Pool *pool = solv->pool;
   Queue q;
-  queue_init(&q);
   Id p;
   int i, qcnt;
 
 #if 0
   printf("check_complex_dep %s\n", pool_dep2str(pool, dep));
 #endif
+  queue_init(&q);
   i = pool_normalize_complex_dep(pool, dep, &q, CPLXDEPS_EXPAND);
   if (i == 0 || i == 1)
     {
index f51a8d3894a7711f2b2dbd004f48cd5588a38478..05891c039b307e2ff519c548831bba3f6b611ce2 100644 (file)
@@ -183,7 +183,7 @@ solver_unifyrules(Solver *solv)
            binr++;
          else
            {
-             dp = solv->pool->whatprovidesdata + r->d;
+             dp = pool->whatprovidesdata + r->d;
              while (*dp++)
                lits++;
            }
@@ -1935,8 +1935,8 @@ solver_addtodupmaps(Solver *solv, Id p, Id how, int targeted)
 void
 solver_createdupmaps(Solver *solv)
 {
-  Queue *job = &solv->job;
   Pool *pool = solv->pool;
+  Queue *job = &solv->job;
   Repo *installed = solv->installed;
   Id select, how, what, p, pp;
   Solvable *s;
@@ -2203,12 +2203,12 @@ reenableblackrule(Solver *solv, Id p)
 void
 solver_addblackrules(Solver *solv)
 {
-  int i;
-  Id how, select, what, p, pp;
-  Queue *job = &solv->job;
   Pool *pool = solv->pool;
   Repo *installed = solv->installed;
+  Id how, select, what, p, pp;
+  Queue *job = &solv->job;
   Map updatemap;
+  int i;
 
   map_init(&updatemap, 0);
   solv->blackrules = solv->nrules;
@@ -3990,7 +3990,7 @@ find_obsolete_group(Solver *solv, Id obs, Queue *q)
     }
   /* find names so that we can build groups */
   queue_init_clone(&qn, q);
-  prune_to_best_version(solv->pool, &qn);
+  prune_to_best_version(pool, &qn);
 #if 0
 {
   for (i = 0; i < qn.count; i++)
index 9194c226d4dab36d4982cd12f8c2dd41e3f7641f..6c1203cac6b37334cbd1ce86595a689443705f66 100644 (file)
@@ -151,11 +151,11 @@ makeruledecisions(Solver *solv, int disablerules)
              solv->decisionmap[vv] = v > 0 ? 1 : -1;
              IF_POOLDEBUG (SOLV_DEBUG_PROPAGATE)
                {
-                 Solvable *s = solv->pool->solvables + vv;
+                 Solvable *s = pool->solvables + vv;
                  if (v < 0)
-                   POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "conflicting %s (assertion)\n", pool_solvable2str(solv->pool, s));
+                   POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "conflicting %s (assertion)\n", pool_solvable2str(pool, s));
                  else
-                   POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "installing  %s (assertion)\n", pool_solvable2str(solv->pool, s));
+                   POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "installing  %s (assertion)\n", pool_solvable2str(pool, s));
                }
              continue;
            }
@@ -311,11 +311,11 @@ makeruledecisions(Solver *solv, int disablerules)
              solv->decisionmap[vv] = v > 0 ? 1 : -1;
              IF_POOLDEBUG (SOLV_DEBUG_PROPAGATE)
                {
-                 Solvable *s = solv->pool->solvables + vv;
+                 Solvable *s = pool->solvables + vv;
                  if (v < 0)
-                   POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "conflicting %s (weak assertion)\n", pool_solvable2str(solv->pool, s));
+                   POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "conflicting %s (weak assertion)\n", pool_solvable2str(pool, s));
                  else
-                   POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "installing  %s (weak assertion)\n", pool_solvable2str(solv->pool, s));
+                   POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "installing  %s (weak assertion)\n", pool_solvable2str(pool, s));
                }
              continue;
            }