summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-27 14:56:47 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-27 14:56:48 +0900
commitfd257fb9c490f4af3fbfb71c4d099fe876be28eb (patch)
tree47a77e44fad3684dfd11333ac9cf0bd1770b907d /src
parent70c6207bfdb27f170377015f65f22e8ba50f6a10 (diff)
downloadlibsolv-fd257fb9c490f4af3fbfb71c4d099fe876be28eb.tar.gz
libsolv-fd257fb9c490f4af3fbfb71c4d099fe876be28eb.tar.bz2
libsolv-fd257fb9c490f4af3fbfb71c4d099fe876be28eb.zip
Imported Upstream version 0.6.14upstream/0.6.14
Change-Id: I3e83c4ddc30f8d8cfa6f965a85ecca72781d89e4 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/rules.c10
-rw-r--r--src/solver.c11
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]))