From e679b515eddb3dd340fb25620de0160211f40fdc Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Tue, 4 Dec 2018 14:04:28 +0900 Subject: Imported Upstream version 0.6.35 Change-Id: Ib7359aa10c08c1469105fbd6a82ea922f46f8b51 Signed-off-by: DongHun Kwak --- src/cleandeps.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/cleandeps.c') diff --git a/src/cleandeps.c b/src/cleandeps.c index cbe2020..1da28f6 100644 --- a/src/cleandeps.c +++ b/src/cleandeps.c @@ -1122,23 +1122,22 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded) #endif if (s->repo == installed && pool->implicitobsoleteusescolors) { - Id a, bestarch = 0; + unsigned int a, bestscore = 0; FOR_PROVIDES(p, pp, s->name) { Solvable *ps = pool->solvables + p; if (ps->name != s->name || ps->repo == installed) continue; - a = ps->arch; - a = (a <= pool->lastarch) ? pool->id2arch[a] : 0; - if (a && a != 1 && (!bestarch || a < bestarch)) - bestarch = a; + a = pool_arch2score(pool, ps->arch); + if (a && a != 1 && (!bestscore || a < bestscore)) + bestscore = a; } - if (bestarch && (s->arch > pool->lastarch || pool->id2arch[s->arch] != bestarch)) + if (bestscore && pool_arch2score(pool, s->arch) != bestscore) { FOR_PROVIDES(p, pp, s->name) { Solvable *ps = pool->solvables + p; - if (ps->repo == installed && ps->name == s->name && ps->evr == s->evr && ps->arch != s->arch && ps->arch < pool->lastarch && pool->id2arch[ps->arch] == bestarch) + if (ps->repo == installed && ps->name == s->name && ps->evr == s->evr && ps->arch != s->arch && pool_arch2score(pool, ps->arch) == bestscore) if (!MAPTST(&im, p)) { #ifdef CLEANDEPSDEBUG -- cgit v1.2.3