From: Michael Schroeder Date: Thu, 22 Dec 2022 09:34:12 +0000 (+0100) Subject: Use pool instread of solv->pool where we can X-Git-Tag: 0.7.24~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c45526288a9ffa6bee2ea8f3c670c915d3d11947;p=thirdparty%2Flibsolv.git Use pool instread of solv->pool where we can --- diff --git a/src/policy.c b/src/policy.c index ddc3a43c..02548ea7 100644 --- a/src/policy.c +++ b/src/policy.c @@ -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) { diff --git a/src/rules.c b/src/rules.c index f51a8d38..05891c03 100644 --- a/src/rules.c +++ b/src/rules.c @@ -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++) diff --git a/src/solver.c b/src/solver.c index 9194c226..6c1203ca 100644 --- a/src/solver.c +++ b/src/solver.c @@ -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; }