diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rules.c | 10 | ||||
-rw-r--r-- | src/solver.c | 11 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src/rules.c b/src/rules.c index 3264e9b..b941986 100644 --- a/src/rules.c +++ b/src/rules.c @@ -928,7 +928,13 @@ solver_addpkgrulesforsolvable(Solver *solv, Solvable *s, Map *m) /* we still obsolete packages with same nevra, like rpm does */ /* (actually, rpm mixes those packages. yuck...) */ if (multi && (s->name != ps->name || s->evr != ps->evr || s->arch != ps->arch)) - continue; + { + if (isinstalled || ps->repo != installed) + continue; + /* also check the installed package for multi-ness */ + if (MAPTST(&solv->multiversion, p)) + continue; + } if (!pool->implicitobsoleteusesprovides && s->name != ps->name) continue; if (pool->implicitobsoleteusescolors && !pool_colormatch(pool, s, ps)) @@ -938,7 +944,7 @@ solver_addpkgrulesforsolvable(Solver *solv, Solvable *s, Map *m) if (s->name == ps->name) { /* optimization: do not add the same-name conflict rule if it was - * already added when we looket at the other package. + * already added when we looked at the other package. * (this assumes pool_colormatch is symmetric) */ if (p && m && ps->repo != installed && MAPTST(m, p) && (ps->arch != ARCH_SRC && ps->arch != ARCH_NOSRC) && diff --git a/src/solver.c b/src/solver.c index 3358b6b..c6cad6b 100644 --- a/src/solver.c +++ b/src/solver.c @@ -2544,13 +2544,20 @@ solver_run_sat(Solver *solv, int disablerules, int doweak) continue; if (solv->decisionmap[p] <= 0) continue; - if (solv->multiversion.size && MAPTST(&solv->multiversion, p)) + if (!solv->keepexplicitobsoletes && solv->multiversion.size && MAPTST(&solv->multiversion, p)) continue; obsp = s->repo->idarraydata + s->obsoletes; /* foreach obsoletes */ while ((obs = *obsp++) != 0) FOR_PROVIDES(po, ppo, obs) - MAPSET(&obsmap, po); + { + Solvable *pos = pool->solvables + po; + if (!pool->obsoleteusesprovides && !pool_match_nevr(pool, pos, obs)) + continue; + if (pool->obsoleteusescolors && !pool_colormatch(pool, s, pos)) + continue; + MAPSET(&obsmap, po); + } } for (i = j = 0; i < dqs.count; i++) if (!MAPTST(&obsmap, dqs.elements[i])) |