libsolv/0001-Do-not-disable-infarch-rules-when-they-dont-conflict-with-the-job.patch
2019-01-15 16:46:52 +01:00

47 lines
1.5 KiB
Diff

From 5323eb7e5c0c8dcdf339113f091317afaed810cc Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Tue, 15 Jan 2019 14:06:08 +0100
Subject: [PATCH] Do not disable infarch rules when they don't conflict with the job
---
src/rules.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/rules.c b/src/rules.c
index 2087b35..175cb8d 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);
}
}
}
--
libgit2 0.27.7