diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2020-11-27 14:49:16 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2020-11-27 14:49:16 +0900 |
commit | 6a68988035ea989055076d81b7ab53c7015c8c32 (patch) | |
tree | 882953ab11585f025ce133c8ad5a281eb4857a80 /src/rules.c | |
parent | cbc3c6a32d29006dda50336e30b42c25f5ca7454 (diff) | |
download | libsolv-6a68988035ea989055076d81b7ab53c7015c8c32.tar.gz libsolv-6a68988035ea989055076d81b7ab53c7015c8c32.tar.bz2 libsolv-6a68988035ea989055076d81b7ab53c7015c8c32.zip |
Imported Upstream version 0.7.12upstream/0.7.12
Diffstat (limited to 'src/rules.c')
-rw-r--r-- | src/rules.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/rules.c b/src/rules.c index f735e5d..6b1432f 100644 --- a/src/rules.c +++ b/src/rules.c @@ -613,7 +613,7 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w } else { - Id *qele; + Id *qele, d; int qcnt; qele = bq.elements + i; @@ -653,7 +653,17 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w break; if (j < qcnt) continue; - addpkgrule(solv, qele[0], 0, pool_ids2whatprovides(pool, qele + 1, qcnt - 1), type, dep); + d = pool_ids2whatprovides(pool, qele + 1, qcnt - 1); + if (solv->ruleinfoq && qele[0] != p) + { + int oldcount = solv->ruleinfoq->count; + addpkgrule(solv, qele[0], 0, d, type, dep); + /* fixup from element of ruleinfo */ + if (solv->ruleinfoq->count > oldcount) + solv->ruleinfoq->elements[oldcount + 1] = p; + } + else + addpkgrule(solv, qele[0], 0, d, type, dep); if (m) for (j = 0; j < qcnt; j++) if (qele[j] > 0 && !MAPTST(m, qele[j])) @@ -2729,7 +2739,8 @@ addpkgruleinfo(Solver *solv, Id p, Id p2, Id d, int type, Id dep) if (*odp) return; } - if (p < 0 && pool->whatprovidesdata[d] < 0 && type == SOLVER_RULE_PKG_CONFLICTS) + /* set p2 for multiversion conflicts */ + if (p < 0 && pool->whatprovidesdata[d] < 0 && pool->whatprovidesdata[d + 1] >= 0 && type == SOLVER_RULE_PKG_CONFLICTS) p2 = pool->whatprovidesdata[d]; } else |