diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2018-12-04 14:04:28 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2018-12-04 14:04:32 +0900 |
commit | e679b515eddb3dd340fb25620de0160211f40fdc (patch) | |
tree | 93271e0bbd40dba805f8270cfc78a3ac10ab2c8f /src/cleandeps.c | |
parent | d98199487aa414cb7f965a058c4395235343e20a (diff) | |
download | libsolv-e679b515eddb3dd340fb25620de0160211f40fdc.tar.gz libsolv-e679b515eddb3dd340fb25620de0160211f40fdc.tar.bz2 libsolv-e679b515eddb3dd340fb25620de0160211f40fdc.zip |
Imported Upstream version 0.6.35upstream/0.6.35
Change-Id: Ib7359aa10c08c1469105fbd6a82ea922f46f8b51
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'src/cleandeps.c')
-rw-r--r-- | src/cleandeps.c | 13 |
1 files changed, 6 insertions, 7 deletions
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 |