diff options
Diffstat (limited to 'src/rules.c')
-rw-r--r-- | src/rules.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rules.c b/src/rules.c index ae14eba..677807c 100644 --- a/src/rules.c +++ b/src/rules.c @@ -2307,6 +2307,16 @@ solver_rule2job(Solver *solv, Id rid, Id *whatp) return solv->job.elements[idx]; } +Id +solver_rule2solvable(Solver *solv, Id rid) +{ + if (rid >= solv->updaterules && rid < solv->updaterules_end) + return rid - solv->updaterules; + if (rid >= solv->featurerules && rid < solv->featurerules_end) + return rid - solv->featurerules; + return 0; +} + /* check if the newest versions of pi still provides the dependency we're looking for */ static int solver_choicerulecheck(Solver *solv, Id pi, Rule *r, Map *m) |