diff options
author | Michael Schroeder <mls@suse.de> | 2012-11-29 13:51:10 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-11-29 13:51:10 +0100 |
commit | f20dc417de9226c0084b2f108b65642cb4406aed (patch) | |
tree | 6f3055a95cd0cd58be92e26da1638f9dc75f7c65 /src/rules.c | |
parent | 022b394e13c4b772a6867bf48664e0213a677cef (diff) | |
download | libsolv-f20dc417de9226c0084b2f108b65642cb4406aed.tar.gz libsolv-f20dc417de9226c0084b2f108b65642cb4406aed.tar.bz2 libsolv-f20dc417de9226c0084b2f108b65642cb4406aed.zip |
fix targeted dup, we also have to add the obsoleters to the involved map
Diffstat (limited to 'src/rules.c')
-rw-r--r-- | src/rules.c | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/src/rules.c b/src/rules.c index a6940df..7764bdf 100644 --- a/src/rules.c +++ b/src/rules.c @@ -1241,22 +1241,20 @@ solver_createdupmaps(Solver *solv) if (!targeted && ps->repo != installed) MAPSET(&solv->dupmap, pi); } - if (!targeted) + if (s->repo == installed && solv->obsoletes && solv->obsoletes[p - installed->start]) { - if (solv->obsoletes && solv->obsoletes[p - installed->start]) + Id *opp; + for (opp = solv->obsoletes_data + solv->obsoletes[p - installed->start]; (pi = *opp++) != 0;) { - Id *opp; - for (opp = solv->obsoletes_data + solv->obsoletes[p - installed->start]; (pi = *opp++) != 0;) - { - ps = pool->solvables + pi; - if (ps->repo == installed) - continue; - MAPSET(&solv->dupinvolvedmap, pi); - MAPSET(&solv->dupmap, pi); - } + ps = pool->solvables + pi; + if (ps->repo == installed) + continue; + MAPSET(&solv->dupinvolvedmap, pi); + if (!targeted) + MAPSET(&solv->dupmap, pi); } } - else if (s->obsoletes) + if (targeted && s->obsoletes) { /* XXX: check obsoletes/provides combination */ obsp = s->repo->idarraydata + s->obsoletes; @@ -1312,22 +1310,20 @@ solver_createdupmaps(Solver *solv) if (!targeted && ps->repo != installed) MAPSET(&solv->dupmap, pi); } - if (!targeted) + if (s->repo == installed && solv->obsoletes && solv->obsoletes[p - installed->start]) { - if (repo == installed && solv->obsoletes && solv->obsoletes[p - installed->start]) + Id *opp; + for (opp = solv->obsoletes_data + solv->obsoletes[p - installed->start]; (pi = *opp++) != 0;) { - Id *opp; - for (opp = solv->obsoletes_data + solv->obsoletes[p - installed->start]; (pi = *opp++) != 0;) - { - ps = pool->solvables + pi; - if (ps->repo == installed) - continue; - MAPSET(&solv->dupinvolvedmap, pi); - MAPSET(&solv->dupmap, pi); - } + ps = pool->solvables + pi; + if (ps->repo == installed) + continue; + MAPSET(&solv->dupinvolvedmap, pi); + if (!targeted) + MAPSET(&solv->dupmap, pi); } } - else if (s->obsoletes) + if (targeted && s->obsoletes) { /* XXX: check obsoletes/provides combination */ obsp = s->repo->idarraydata + s->obsoletes; |