summaryrefslogtreecommitdiff
path: root/src/rules.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-11-29 13:51:10 +0100
committerMichael Schroeder <mls@suse.de>2012-11-29 13:51:10 +0100
commitf20dc417de9226c0084b2f108b65642cb4406aed (patch)
tree6f3055a95cd0cd58be92e26da1638f9dc75f7c65 /src/rules.c
parent022b394e13c4b772a6867bf48664e0213a677cef (diff)
downloadlibsolv-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.c44
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;