small optimization for targeted dup
authorMichael Schroeder <mls@suse.de>
Fri, 30 Nov 2012 13:40:01 +0000 (14:40 +0100)
committerMichael Schroeder <mls@suse.de>
Fri, 30 Nov 2012 13:40:01 +0000 (14:40 +0100)
src/rules.c

index 2747422..5f8cfbc 100644 (file)
@@ -1198,7 +1198,7 @@ solver_addtodupmaps(Solver *solv, Id p, Id how, int targeted)
       if (ps->name != s->name)
        continue;
       MAPSET(&solv->dupinvolvedmap, pi);
-      if (ps->repo == installed && solv->obsoletes && solv->obsoletes[pi - installed->start])
+      if (targeted && ps->repo == installed && solv->obsoletes && solv->obsoletes[pi - installed->start])
        {
          Id *opp, pi2;
          for (opp = solv->obsoletes_data + solv->obsoletes[pi - installed->start]; (pi2 = *opp++) != 0;)
@@ -1241,7 +1241,7 @@ solver_addtodupmaps(Solver *solv, Id p, Id how, int targeted)
              if (pool->obsoleteusescolors && !pool_colormatch(pool, s, ps))
                continue;
              MAPSET(&solv->dupinvolvedmap, pi);
-             if (ps->repo == installed && solv->obsoletes && solv->obsoletes[pi - installed->start])
+             if (targeted && ps->repo == installed && solv->obsoletes && solv->obsoletes[pi - installed->start])
                {
                  Id *opp, pi2;
                  for (opp = solv->obsoletes_data + solv->obsoletes[pi - installed->start]; (pi2 = *opp++) != 0;)