Id duprules; /* dist upgrade rules */
Id duprules_end;
+ Id bestrules; /* rules from SOLVER_FORCEBEST */
+ Id bestrules_end;
+ Id *bestrules_pkg;
+
Id choicerules; /* choice rules (always weak) */
Id choicerules_end;
Id *choicerules_ref;
Map updatemap; /* bring these installed packages to the newest version */
int updatemap_all; /* bring all packages to the newest version */
+ Map bestupdatemap; /* create best rule for those packages */
+ int bestupdatemap_all; /* bring all packages to the newest version */
+
Map fixmap; /* fix these packages */
int fixmap_all; /* fix all packages */
int noinfarchcheck; /* true: do not forbid inferior architectures */
int keepexplicitobsoletes; /* true: honor obsoletes during multiinstall */
+ int bestobeypolicy; /* true: stay in policy with the best rules */
Map dupmap; /* dup these packages*/
* you will get problem reported if the best package is
* not installable. This can be used with INSTALL, UPDATE
* and DISTUPGRADE */
-/* Also, it's not implemented yet ;) */
#define SOLVER_FORCEBEST 0x100000
#define SOLVER_SETEV 0x01000000
#define SOLVER_FLAG_NO_INFARCHCHECK 9
#define SOLVER_FLAG_ALLOW_NAMECHANGE 10
#define SOLVER_FLAG_KEEP_EXPLICIT_OBSOLETES 11
+#define SOLVER_FLAG_BEST_OBEY_POLICY 12
extern Solver *solver_create(Pool *pool);
extern void solver_free(Solver *solv);
int pool_isemptyupdatejob(Pool *pool, Id how, Id what);
/* iterate over all literals of a rule */
-/* WARNING: loop body must not relocate whatprovidesdata, e.g. by
- * looking up the providers of a dependency */
-#define FOR_RULELITERALS(l, dp, r) \
- for (l = r->d < 0 ? -r->d - 1 : r->d, \
- dp = !l ? &r->w2 : pool->whatprovidesdata + l, \
- l = r->p; l; l = (dp != &r->w2 + 1 ? *dp++ : 0))
+#define FOR_RULELITERALS(l, pp, r) \
+ for (pp = r->d < 0 ? -r->d - 1 : r->d, \
+ l = r->p; l; l = (pp <= 0 ? (pp-- ? 0 : r->w2) : \
+ pool->whatprovidesdata[pp++]))
+
+
+
/* XXX: this currently doesn't work correctly for SOLVER_SOLVABLE_REPO and
SOLVER_SOLVABLE_ALL */