diff options
author | Michael Schroeder <mls@suse.de> | 2013-08-21 14:34:46 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-08-21 14:34:46 +0200 |
commit | 6861611dc8a8dcce70578d4494d9fbb7352ff019 (patch) | |
tree | 964f79f29ec36a6dc6875e4e4355c1d3f11cb3f7 /src/solver.c | |
parent | eee4aa9298efb0d87f2e069ca895e0da0b718833 (diff) | |
download | libsolv-6861611dc8a8dcce70578d4494d9fbb7352ff019.tar.gz libsolv-6861611dc8a8dcce70578d4494d9fbb7352ff019.tar.bz2 libsolv-6861611dc8a8dcce70578d4494d9fbb7352ff019.zip |
make solver_describe_decision always return a rule, add solver_rule2solvable()
that way users of describe_decision have the correct rule, they can use
solver_rule2solvable to get the id of the solvable.
Diffstat (limited to 'src/solver.c')
-rw-r--r-- | src/solver.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/solver.c b/src/solver.c index a846477..eb4afde 100644 --- a/src/solver.c +++ b/src/solver.c @@ -4025,11 +4025,7 @@ solver_describe_decision(Solver *solv, Id p, Id *infop) if (i < solv->decisioncnt_update) { if (i == 0) - { - if (infop) - *infop = SYSTEMSOLVABLE; - return SOLVER_REASON_KEEP_INSTALLED; - } + return SOLVER_REASON_KEEP_INSTALLED; if (infop) *infop = why; return SOLVER_REASON_RESOLVE_JOB; @@ -4039,12 +4035,7 @@ solver_describe_decision(Solver *solv, Id p, Id *infop) if (why == 0 && pp < 0) return SOLVER_REASON_CLEANDEPS_ERASE; if (infop) - { - if (why >= solv->updaterules && why < solv->updaterules_end) - *infop = why - solv->updaterules; - else if (why >= solv->featurerules && why < solv->featurerules_end) - *infop = why - solv->featurerules; - } + *infop = why; return SOLVER_REASON_UPDATE_INSTALLED; } if (i < solv->decisioncnt_resolve) @@ -4052,12 +4043,7 @@ solver_describe_decision(Solver *solv, Id p, Id *infop) if (why == 0 && pp < 0) return SOLVER_REASON_CLEANDEPS_ERASE; if (infop) - { - if (why >= solv->updaterules && why < solv->updaterules_end) - *infop = why - solv->updaterules; - else if (why >= solv->featurerules && why < solv->featurerules_end) - *infop = why - solv->featurerules; - } + *infop = why; return SOLVER_REASON_KEEP_INSTALLED; } if (i < solv->decisioncnt_weak) |