From: Michael Schroeder Date: Mon, 19 Dec 2022 13:51:10 +0000 (+0100) Subject: Speed up obsoletes handling in update rule generation a bit X-Git-Tag: 0.7.24~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b460ac4fb1b17610a43ac756053ee86c0ec94aa5;p=thirdparty%2Flibsolv.git Speed up obsoletes handling in update rule generation a bit --- diff --git a/src/policy.c b/src/policy.c index c02d2373..12575d5b 100644 --- a/src/policy.c +++ b/src/policy.c @@ -1628,11 +1628,11 @@ policy_findupdatepackages(Solver *solv, Solvable *s, Queue *qs, int allow_all) { FOR_PROVIDES(p2, pp2, obs) /* and all matching providers of the obsoletes */ { - Solvable *ps2 = pool->solvables + p2; - if (!pool->obsoleteusesprovides && !pool_match_nevr(pool, ps2, obs)) + if (p2 != n) continue; - if (p2 == n) /* match ! */ - break; + if (!pool->obsoleteusesprovides && !pool_match_nevr(pool, s, obs)) + continue; + break; } if (p2) /* match! */ break;