From: Michael Schroeder Date: Tue, 18 Apr 2023 09:57:50 +0000 (+0200) Subject: Treat condition both as positive and negative literal in pool_add_pos_literals_comple... X-Git-Tag: 0.7.25~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1edb35a3bd9abcede3a200471a4d1868f8054c99;p=thirdparty%2Flibsolv.git 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 --- 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; }