diff options
author | Michael Schroeder <mls@suse.de> | 2010-06-01 18:05:35 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2010-06-01 18:05:35 +0200 |
commit | e362e8eb31ade170f6b02822e77db5b5a0f057ca (patch) | |
tree | 480f3470420f4df6dd36b631da72e043ea6dc1ab /src/problems.c | |
parent | 9568238828422a65bf3325693c7dc993e91060e5 (diff) | |
download | libsolv-e362e8eb31ade170f6b02822e77db5b5a0f057ca.tar.gz libsolv-e362e8eb31ade170f6b02822e77db5b5a0f057ca.tar.bz2 libsolv-e362e8eb31ade170f6b02822e77db5b5a0f057ca.zip |
- work around debian obsoletes handling for now
- make solv run on debian, too
Diffstat (limited to 'src/problems.c')
-rw-r--r-- | src/problems.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/problems.c b/src/problems.c index 6dcca8a..866ca11 100644 --- a/src/problems.c +++ b/src/problems.c @@ -564,14 +564,34 @@ create_solutions(Solver *solv, int probnr, int solidx) convertsolution(solv, solution.elements[j], &solv->solutions); if (solv->solutions.count == solstart + 1) { - solv->solutions.count--; - if (!essentialok && i + 1 == problem.count && !nsol) + solv->solutions.count--; /* this one did not work out */ + if (nsol || i + 1 < problem.count) + continue; /* got one or still hope */ + if (!essentialok) { /* nothing found, start over */ + POOL_DEBUG(SAT_DEBUG_SOLUTIONS, "nothing found, re-run with essentialok = 1\n"); essentialok = 1; i = -1; + continue; + } + /* this is bad, we found no solution */ + /* for now just offer a rule */ + POOL_DEBUG(SAT_DEBUG_SOLUTIONS, "nothing found, already did essentialok, fake it\n"); + queue_push(&solv->solutions, 0); + for (j = 0; j < problem.count; j++) + { + queue_empty(&solution); + queue_push(&solution, problem.elements[j]); + convertsolution(solv, solution.elements[j], &solv->solutions); + if (solv->solutions.count > solstart + 1) + break; + } + if (solv->solutions.count == solstart + 1) + { + solv->solutions.count--; + continue; /* sorry */ } - continue; } /* patch in number of solution elements */ solv->solutions.elements[solstart] = (solv->solutions.count - (solstart + 1)) / 2; |