Skip to content

Commit 5323eb7

Browse files
committed
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.
1 parent 52fd211 commit 5323eb7

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

src/rules.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,7 +2126,13 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
21262126
if ((set & SOLVER_SETARCH) != 0 && solv->infarchrules != solv->infarchrules_end)
21272127
{
21282128
if (select == SOLVER_SOLVABLE)
2129-
queue_push2(q, DISABLE_INFARCH, pool->solvables[what].name);
2129+
{
2130+
for (i = solv->infarchrules; i < solv->infarchrules_end; i++)
2131+
if (solv->rules[i].p == -what)
2132+
break;
2133+
if (i < solv->infarchrules_end)
2134+
queue_push2(q, DISABLE_INFARCH, pool->solvables[what].name);
2135+
}
21302136
else
21312137
{
21322138
int qcnt = q->count;
@@ -2140,8 +2146,12 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
21402146
if (q->elements[i + 1] == s->name)
21412147
break;
21422148
if (i < q->count)
2143-
continue;
2144-
queue_push2(q, DISABLE_INFARCH, s->name);
2149+
continue; /* already have that DISABLE_INFARCH element */
2150+
for (i = solv->infarchrules; i < solv->infarchrules_end; i++)
2151+
if (solv->rules[i].p == -p)
2152+
break;
2153+
if (i < solv->infarchrules_end)
2154+
queue_push2(q, DISABLE_INFARCH, s->name);
21452155
}
21462156
}
21472157
}

0 commit comments

Comments
 (0)