]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- fix probsolved logic
authorMichael Schroeder <mls@suse.de>
Wed, 5 Nov 2008 15:20:24 +0000 (15:20 +0000)
committerMichael Schroeder <mls@suse.de>
Wed, 5 Nov 2008 15:20:24 +0000 (15:20 +0000)
src/solver.c

index efda5044a6d7066c7853e35bebe745715b2cc2c0..3315259ac4b1aaef6237b8a5deee1d218770fbd0 100644 (file)
@@ -3219,9 +3219,11 @@ problems_to_solutions(Solver *solv, Queue *job)
        }
       if (v < 0 && (job->elements[-v - 1] & SOLVER_ESSENTIAL))
        {
-         /* essential job, skip if we already have a solution */
-         if (probsolved)
+         /* essential job, skip if we already have a non-essential
+             solution */
+         if (probsolved > 0)
            continue;
+         probsolved = -1;      /* show all solutions */
        }
       refine_suggestion(solv, job, problem, v, &solution);
       if (!solution.count)
@@ -3289,7 +3291,8 @@ problems_to_solutions(Solver *solv, Queue *job)
       /* mark end of this solution */
       if (nsol)
        {
-         probsolved = 1;
+         if (!probsolved)
+           probsolved = 1;
          queue_push(&solutions, 0);
          queue_push(&solutions, 0);
        }