make sure that the ttransaction_info contains only packages that have the transacts...
authorMichael Schroeder <mls@suse.de>
Fri, 6 Sep 2013 15:48:59 +0000 (17:48 +0200)
committerMichael Schroeder <mls@suse.de>
Fri, 6 Sep 2013 15:48:59 +0000 (17:48 +0200)
can happen if transaction_create_decisionq is called with a decisionq
that doesn't match the pool's obsolete flags.

src/transaction.c

index 69c12d9..0e266fa 100644 (file)
@@ -629,6 +629,8 @@ create_transaction_info(Transaction *trans, Queue *decisionq)
            {
              FOR_PROVIDES(p2, pp2, obs)
                {
            {
              FOR_PROVIDES(p2, pp2, obs)
                {
+                 if (!MAPTST(&trans->transactsmap, p2))
+                   continue;
                  s2 = pool->solvables + p2;
                  if (s2->repo != installed)
                    continue;
                  s2 = pool->solvables + p2;
                  if (s2->repo != installed)
                    continue;
@@ -2024,6 +2026,8 @@ transaction_add_obsoleted(Transaction *trans)
        {
          p = obsq.elements[k];
          assert(p >= installed->start && p < installed->end);
        {
          p = obsq.elements[k];
          assert(p >= installed->start && p < installed->end);
+         if (!MAPTST(&trans->transactsmap, p)) /* just in case */
+           continue;
          if (MAPTST(&done, p - installed->start))
            continue;
          MAPSET(&done, p - installed->start);
          if (MAPTST(&done, p - installed->start))
            continue;
          MAPSET(&done, p - installed->start);