From: Michael Schroeder Date: Fri, 5 Jan 2018 14:15:51 +0000 (+0100) Subject: Set dup updaters when creating the dup maps X-Git-Tag: 0.6.31~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebd5f74dfbb7ad825379ddfb56f98f8fef92d12f;p=thirdparty%2Flibsolv.git Set dup updaters when creating the dup maps We used to do this when creating the dup rules. But that means the update information is not available when creating the update rules which results in no special update data being saved. Fixes bnc#1074207. --- diff --git a/src/rules.c b/src/rules.c index 261e8595..49d689df 100644 --- a/src/rules.c +++ b/src/rules.c @@ -1922,6 +1922,21 @@ solver_createdupmaps(Solver *solv) } if (solv->dupinvolvedmap.size) MAPCLR(&solv->dupinvolvedmap, SYSTEMSOLVABLE); + /* set update for all involved installed packages. We need to do + * this before creating the update rules */ + if (solv->dupinvolvedmap_all) + solv->updatemap_all = 1; + if (installed && !solv->updatemap_all) + { + FOR_REPO_SOLVABLES(installed, p, s) + { + if (!solv->dupinvolvedmap_all && !MAPTST(&solv->dupinvolvedmap, p)) + continue; + if (!solv->updatemap.size) + map_grow(&solv->updatemap, installed->end - installed->start); + MAPSET(&solv->updatemap, p - installed->start); + } + } } void @@ -1943,8 +1958,6 @@ solver_addduprules(Solver *solv, Map *addedmap) Rule *r; solv->duprules = solv->nrules; - if (solv->dupinvolvedmap_all) - solv->updatemap_all = 1; for (i = 1; i < pool->nsolvables; i++) { if (i == SYSTEMSOLVABLE || !MAPTST(addedmap, i)) @@ -1964,12 +1977,6 @@ solver_addduprules(Solver *solv, Map *addedmap) continue; if (installed && ps->repo == installed) { - if (!solv->updatemap_all) - { - if (!solv->updatemap.size) - map_grow(&solv->updatemap, installed->end - installed->start); - MAPSET(&solv->updatemap, p - installed->start); - } if (!MAPTST(&solv->dupmap, p)) { Id ip, ipp;