From: Michael Schroeder Date: Mon, 25 Aug 2008 10:55:58 +0000 (+0000) Subject: - also check obsoletes when disabling update rules X-Git-Tag: BASE-SuSE-Code-12_1-Branch~553 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f99547c0a43658236dcebb8e0d4850656414ffd;p=platform%2Fupstream%2Flibsolv.git - also check obsoletes when disabling update rules --- diff --git a/src/solver.c b/src/solver.c index c8866b4..f3826e4 100644 --- a/src/solver.c +++ b/src/solver.c @@ -910,9 +910,23 @@ disableupdaterules(Solver *solv, Queue *job, int jobidx) s = pool->solvables + what; if (solv->noobsoletes.size && MAPTST(&solv->noobsoletes, what)) break; + if (s->obsoletes) + { + Id obs, *obsp; + obsp = s->repo->idarraydata + s->obsoletes; + while ((obs = *obsp++) != 0) + FOR_PROVIDES(p, pp, obs) + { + if (pool->solvables[p].repo != installed) + continue; + if (!solv->obsoleteusesprovides && !pool_match_nevr(pool, pool->solvables + p, obs)) + continue; + MAPSET(&solv->noupdate, p - installed->start); + } + } FOR_PROVIDES(p, pp, s->name) { - if (pool->solvables[p].name != s->name) + if (!solv->implicitobsoleteusesprovides && pool->solvables[p].name != s->name) continue; if (pool->solvables[p].repo == installed) MAPSET(&solv->noupdate, p - installed->start); @@ -949,9 +963,33 @@ disableupdaterules(Solver *solv, Queue *job, int jobidx) { case SOLVER_INSTALL_SOLVABLE: s = pool->solvables + what; + if (s->obsoletes) + { + Id obs, *obsp; + obsp = s->repo->idarraydata + s->obsoletes; + while ((obs = *obsp++) != 0) + FOR_PROVIDES(p, pp, obs) + { + if (pool->solvables[p].repo != installed) + continue; + if (!solv->obsoleteusesprovides && !pool_match_nevr(pool, pool->solvables + p, obs)) + continue; + if (MAPTST(&solv->noupdate, p - installed->start)) + continue; + r = solv->rules + solv->updaterules + (p - installed->start); + if (r->d >= 0) + continue; + enablerule(solv, r); + IF_POOLDEBUG (SAT_DEBUG_SOLUTIONS) + { + POOL_DEBUG(SAT_DEBUG_SOLUTIONS, "@@@ re-enabling "); + solver_printrule(solv, SAT_DEBUG_SOLUTIONS, r); + } + } + } FOR_PROVIDES(p, pp, s->name) { - if (pool->solvables[p].name != s->name) + if (!solv->implicitobsoleteusesprovides && pool->solvables[p].name != s->name) continue; if (pool->solvables[p].repo != installed) continue;