2 * Copyright (c) 2011, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
9 * solver_private.h - private functions
13 #ifndef LIBSOLV_SOLVER_PRIVATE_H
14 #define LIBSOLV_SOLVER_PRIVATE_H
16 extern void solver_run_sat(Solver *solv, int disablerules, int doweak);
17 extern void solver_reset(Solver *solv);
19 extern int solver_dep_installed(Solver *solv, Id dep);
20 extern int solver_splitprovides(Solver *solv, Id dep);
23 solver_dep_fulfilled(Solver *solv, Id dep)
25 Pool *pool = solv->pool;
30 Reldep *rd = GETRELDEP(pool, dep);
31 if (rd->flags == REL_AND)
33 if (!solver_dep_fulfilled(solv, rd->name))
35 return solver_dep_fulfilled(solv, rd->evr);
37 if (rd->flags == REL_NAMESPACE && rd->name == NAMESPACE_SPLITPROVIDES)
38 return solver_splitprovides(solv, rd->evr);
39 if (rd->flags == REL_NAMESPACE && rd->name == NAMESPACE_INSTALLED)
40 return solver_dep_installed(solv, rd->evr);
42 FOR_PROVIDES(p, pp, dep)
44 if (solv->decisionmap[p] > 0)
51 solver_is_supplementing(Solver *solv, Solvable *s)
56 supp = s->repo->idarraydata + s->supplements;
57 while ((sup = *supp++) != 0)
58 if (solver_dep_fulfilled(solv, sup))
64 solver_is_enhancing(Solver *solv, Solvable *s)
69 enhp = s->repo->idarraydata + s->enhances;
70 while ((enh = *enhp++) != 0)
71 if (solver_dep_fulfilled(solv, enh))
76 #endif /* LIBSOLV_SOLVER_PRIVATE_H */