From: Michael Schroeder Date: Tue, 15 Jan 2019 13:06:08 +0000 (+0100) Subject: Do not disable infarch rules when they don't conflict with the job X-Git-Tag: 0.7.3~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5323eb7e5c0c8dcdf339113f091317afaed810cc;p=thirdparty%2Flibsolv.git Do not disable infarch rules when they don't conflict with the job Otherwise installing a package with the best arch might allow to pull in the inferior arch as well. --- diff --git a/src/rules.c b/src/rules.c index 2087b35c..175cb8d9 100644 --- a/src/rules.c +++ b/src/rules.c @@ -2126,7 +2126,13 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q) if ((set & SOLVER_SETARCH) != 0 && solv->infarchrules != solv->infarchrules_end) { if (select == SOLVER_SOLVABLE) - queue_push2(q, DISABLE_INFARCH, pool->solvables[what].name); + { + for (i = solv->infarchrules; i < solv->infarchrules_end; i++) + if (solv->rules[i].p == -what) + break; + if (i < solv->infarchrules_end) + queue_push2(q, DISABLE_INFARCH, pool->solvables[what].name); + } else { int qcnt = q->count; @@ -2140,8 +2146,12 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q) if (q->elements[i + 1] == s->name) break; if (i < q->count) - continue; - queue_push2(q, DISABLE_INFARCH, s->name); + continue; /* already have that DISABLE_INFARCH element */ + for (i = solv->infarchrules; i < solv->infarchrules_end; i++) + if (solv->rules[i].p == -p) + break; + if (i < solv->infarchrules_end) + queue_push2(q, DISABLE_INFARCH, s->name); } } }