diff options
author | Michael Schroeder <mls@suse.de> | 2013-01-11 13:54:53 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-01-11 13:54:53 +0100 |
commit | b746354f4cd0ef51a155241369de1f804f5f756c (patch) | |
tree | 00649aa23a4b9e84575bb26b6b309fe92add8ee1 /src/problems.c | |
parent | 80cc562d125daa090c1dbdba7aa85e0860ba9b90 (diff) | |
download | libsolv-b746354f4cd0ef51a155241369de1f804f5f756c.tar.gz libsolv-b746354f4cd0ef51a155241369de1f804f5f756c.tar.bz2 libsolv-b746354f4cd0ef51a155241369de1f804f5f756c.zip |
support "pooljobs", fixed jobs set in the pool
Those are normally jobs like USERINSTALLED or NOOBSOLETES.
Diffstat (limited to 'src/problems.c')
-rw-r--r-- | src/problems.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/problems.c b/src/problems.c index fe3f2a2..11db5fe 100644 --- a/src/problems.c +++ b/src/problems.c @@ -260,7 +260,7 @@ refine_suggestion(Solver *solv, Id *problem, Id sug, Queue *refined, int essenti nupdate++; else { - if (!essentialok && (solv->job.elements[-v -1] & SOLVER_ESSENTIAL) != 0) + if (!essentialok && (solv->job.elements[-v - 1] & SOLVER_ESSENTIAL) != 0) continue; /* not that one! */ njob++; } @@ -382,8 +382,17 @@ convertsolution(Solver *solv, Id why, Queue *solutionq) Pool *pool = solv->pool; if (why < 0) { - queue_push(solutionq, 0); - queue_push(solutionq, -why); + why = -why; + if (why < solv->pooljobcnt) + { + queue_push(solutionq, SOLVER_SOLUTION_POOLJOB); + queue_push(solutionq, why); + } + else + { + queue_push(solutionq, SOLVER_SOLUTION_JOB); + queue_push(solutionq, why - solv->pooljobcnt); + } return; } if (why >= solv->infarchrules && why < solv->infarchrules_end) @@ -775,6 +784,8 @@ solver_solutionelement_extrajobflags(Solver *solv, Id problem, Id solution) * -> add (SOLVER_INSTALL|SOLVER_SOLVABLE, rp) to the job * SOLVER_SOLUTION_JOB jobidx * -> remove job (jobidx - 1, jobidx) from job queue + * SOLVER_SOLUTION_POOLJOB jobidx + * -> remove job (jobidx - 1, jobidx) from pool job queue * pkgid (> 0) 0 * -> add (SOLVER_ERASE|SOLVER_SOLVABLE, p) to the job * pkgid (> 0) pkgid (> 0) @@ -807,6 +818,12 @@ solver_take_solutionelement(Solver *solv, Id p, Id rp, Id extrajobflags, Queue * { int i; + if (p == SOLVER_SOLUTION_POOLJOB) + { + solv->pool->pooljobs.elements[rp - 1] = SOLVER_NOOP; + solv->pool->pooljobs.elements[rp] = 0; + return; + } if (p == SOLVER_SOLUTION_JOB) { job->elements[rp - 1] = SOLVER_NOOP; |