]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
fix bug in reorder_dq_for_jobrules
authorMichael Schroeder <mls@suse.de>
Mon, 6 Oct 2014 15:19:13 +0000 (17:19 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 6 Oct 2014 15:19:13 +0000 (17:19 +0200)
The next level is actually "level + 1", so by using level we punch
zeros in our decisionmap leading to some nasty bugs later on
(e.g. when we need to revert).

src/solver.c

index 2ba906ff903938d0451c119982de472f3085566a..14fe78d7789b4348d2f44332392523f717fb5f9c 100644 (file)
@@ -1390,7 +1390,7 @@ reorder_dq_for_jobrules(Solver *solv, int level, Queue *dq)
        continue;
       if (solv->decisionmap[p] == 0)
        {
-         solv->decisionmap[p] = level;
+         solv->decisionmap[p] = level + 1;
          haveone = 1;
        }
     }
@@ -1414,7 +1414,7 @@ reorder_dq_for_jobrules(Solver *solv, int level, Queue *dq)
       dq->elements[j++] = dq->elements[i];
   queue_truncate(dq, j);
   FOR_REPO_SOLVABLES(solv->installed, p, s)
-    if (solv->decisionmap[p] == level)
+    if (solv->decisionmap[p] == level + 1)
       solv->decisionmap[p] = 0;
 }