libsolv/0001-Treat-condition-both-as-positive-and-negative-litera.patch
2023-05-15 12:58:33 +02:00

31 lines
1019 B
Diff

From 1edb35a3bd9abcede3a200471a4d1868f8054c99 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Tue, 18 Apr 2023 11:57:50 +0200
Subject: [PATCH 1/5] Treat condition both as positive and negative literal in
pool_add_pos_literals_complex_dep
That's because (A IF B ELSE C) gets rewritten to (A OR ~B) AND (C OR B) and
(A UNLESS B ELSE C) gets rewritten to (A AND ~B) OR (C AND B). In both
cases we have A, B, ~B, C.
This resolves issue #527
---
src/cplxdeps.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/cplxdeps.c b/src/cplxdeps.c
index 6c40752e..26e754d9 100644
--- a/src/cplxdeps.c
+++ b/src/cplxdeps.c
@@ -405,6 +405,7 @@ pool_add_pos_literals_complex_dep(Pool *pool, Id dep, Queue *q, Map *m, int neg)
Reldep *rd2 = GETRELDEP(pool, rd->evr);
if (rd2->flags == REL_ELSE)
{
+ pool_add_pos_literals_complex_dep(pool, rd2->name, q, m, !neg);
pool_add_pos_literals_complex_dep(pool, rd2->evr, q, m, !neg);
dep = rd2->name;
}
--
2.40.1