From: Michael Schroeder Date: Fri, 2 Aug 2019 14:33:00 +0000 (+0200) Subject: Improve fix for issue #343 X-Git-Tag: 0.7.6~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bb2290c5e88648697ddbe011a2134eecd3cc9ee;p=thirdparty%2Flibsolv.git Improve fix for issue #343 The old commit just checked if the package was identical to the one we're updating. But we need to check against all the installed packages. --- diff --git a/src/solver.c b/src/solver.c index 532748cc..5453b39d 100644 --- a/src/solver.c +++ b/src/solver.c @@ -1720,15 +1720,26 @@ resolve_installed(Solver *solv, int level, int disablerules, Queue *dq) { if (specialupdaters && (d = specialupdaters[i - installed->start]) != 0) { + int j; /* special multiversion handling, make sure best version is chosen */ if (rr->p == i && solv->decisionmap[i] >= 0) queue_push(dq, i); while ((p = pool->whatprovidesdata[d++]) != 0) + if (solv->decisionmap[p] >= 0) + queue_push(dq, p); + for (j = 0; j < dq->count; j++) { - if (solv->decisionmap[p] >= 0) - queue_push(dq, p); - else if (solvable_identical(pool->solvables + p, pool->solvables + i) && rr->p == i && solv->decisionmap[i] >= 0) - queue_push(dq, p); /* identical to installed, put it on the list so we have a repo prio */ + Id p2 = dq->elements[j]; + if (pool->solvables[p2].repo != installed) + continue; + d = specialupdaters[i - installed->start]; + while ((p = pool->whatprovidesdata[d++]) != 0) + { + if (solv->decisionmap[p] >= 0 || pool->solvables[p].repo == installed) + continue; + if (solvable_identical(pool->solvables + p, pool->solvables + p2)) + queue_push(dq, p); /* identical to installed, put it on the list so we have a repo prio */ + } } if (dq->count && solv->update_targets && solv->update_targets->elements[i - installed->start]) prune_to_update_targets(solv, solv->update_targets->elements + solv->update_targets->elements[i - installed->start], dq);