From: Michael Schroeder Date: Thu, 19 Oct 2017 12:06:47 +0000 (+0200) Subject: Fix distupgrade all packages when there is no installed repo X-Git-Tag: 0.6.30~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=322ce52d48e292ba9d5c415d119bbac8a4c0bdbd;p=thirdparty%2Flibsolv.git Fix distupgrade all packages when there is no installed repo --- diff --git a/src/rules.c b/src/rules.c index b66bf5ff..f8f072e8 100644 --- a/src/rules.c +++ b/src/rules.c @@ -1876,12 +1876,16 @@ solver_createdupmaps(Solver *solv) solv->dupinvolvedmap_all = 1; FOR_POOL_SOLVABLES(p) { - if (installed && pool->solvables[p].repo != installed) - MAPSET(&solv->dupmap, p); + Solvable *s = pool->solvables + p; + if (!s->repo || s->repo == installed) + continue; + if (!pool_installable(pool, s)) + continue; + MAPSET(&solv->dupmap, p); } - if (how & SOLVER_FORCEBEST) + if ((how & SOLVER_FORCEBEST) != 0) solv->bestupdatemap_all = 1; - if (how & SOLVER_CLEANDEPS) + if ((how & SOLVER_CLEANDEPS) != 0 && installed) { FOR_REPO_SOLVABLES(installed, p, s) add_cleandeps_updatepkg(solv, p);