-typedef enum {
- SOLVCMD_NULL=0,
- SOLVER_INSTALL_SOLVABLE,
- SOLVER_ERASE_SOLVABLE,
- SOLVER_INSTALL_SOLVABLE_NAME,
- SOLVER_ERASE_SOLVABLE_NAME,
- SOLVER_INSTALL_SOLVABLE_PROVIDES,
- SOLVER_ERASE_SOLVABLE_PROVIDES,
- SOLVER_INSTALL_SOLVABLE_UPDATE,
- SOLVER_INSTALL_SOLVABLE_ONE_OF,
- SOLVER_WEAKEN_SOLVABLE_DEPS,
- SOLVER_WEAK = 0x100,
-} SolverCmd;
-
-typedef enum {
- SOLVER_PROBLEM_UPDATE_RULE,
- SOLVER_PROBLEM_JOB_RULE,
- SOLVER_PROBLEM_JOB_NOTHING_PROVIDES_DEP,
- SOLVER_PROBLEM_NOT_INSTALLABLE,
- SOLVER_PROBLEM_NOTHING_PROVIDES_DEP,
- SOLVER_PROBLEM_SAME_NAME,
- SOLVER_PROBLEM_PACKAGE_CONFLICT,
- SOLVER_PROBLEM_PACKAGE_OBSOLETES,
- SOLVER_PROBLEM_DEP_PROVIDERS_NOT_INSTALLABLE,
- SOLVER_PROBLEM_SELF_CONFLICT
-} SolverProbleminfo;
-
-
-extern Solver *solver_create(Pool *pool, Repo *installed);
+#define SOLVER_SOLVABLE 0x01
+#define SOLVER_SOLVABLE_NAME 0x02
+#define SOLVER_SOLVABLE_PROVIDES 0x03
+#define SOLVER_SOLVABLE_ONE_OF 0x04
+#define SOLVER_SOLVABLE_REPO 0x05
+#define SOLVER_SOLVABLE_ALL 0x06
+
+#define SOLVER_SELECTMASK 0xff
+
+#define SOLVER_NOOP 0x0000
+#define SOLVER_INSTALL 0x0100
+#define SOLVER_ERASE 0x0200
+#define SOLVER_UPDATE 0x0300
+#define SOLVER_WEAKENDEPS 0x0400
+#define SOLVER_MULTIVERSION 0x0500
+#define SOLVER_LOCK 0x0600
+#define SOLVER_DISTUPGRADE 0x0700
+#define SOLVER_VERIFY 0x0800
+#define SOLVER_DROP_ORPHANED 0x0900
+#define SOLVER_USERINSTALLED 0x0a00
+
+#define SOLVER_JOBMASK 0xff00
+
+#define SOLVER_WEAK 0x010000
+#define SOLVER_ESSENTIAL 0x020000
+#define SOLVER_CLEANDEPS 0x040000
+/* ORUPDATE makes SOLVER_INSTALL not prune to installed
+ * packages, thus updating installed packages */
+#define SOLVER_ORUPDATE 0x080000
+/* FORCEBEST makes the solver insist on best packages, so
+ * you will get problem reported if the best package is
+ * not installable. This can be used with INSTALL, UPDATE
+ * and DISTUPGRADE */
+#define SOLVER_FORCEBEST 0x100000
+/* TARGETED is used in up/dup jobs to make the solver
+ * treat the specified selection as target packages.
+ * It is automatically assumed if the selection does not
+ * contain an "installed" package unless the
+ * NO_AUTOTARGET solver flag is set */
+#define SOLVER_TARGETED 0x200000
+/* This (SOLVER_INSTALL) job was automatically added
+ * and thus does not the add to the userinstalled packages */
+#define SOLVER_NOTBYUSER 0x400000
+
+#define SOLVER_SETEV 0x01000000
+#define SOLVER_SETEVR 0x02000000
+#define SOLVER_SETARCH 0x04000000
+#define SOLVER_SETVENDOR 0x08000000
+#define SOLVER_SETREPO 0x10000000
+#define SOLVER_NOAUTOSET 0x20000000
+#define SOLVER_SETNAME 0x40000000
+
+#define SOLVER_SETMASK 0x7f000000
+
+/* legacy */
+#define SOLVER_NOOBSOLETES SOLVER_MULTIVERSION
+
+#define SOLVER_REASON_UNRELATED 0
+#define SOLVER_REASON_UNIT_RULE 1
+#define SOLVER_REASON_KEEP_INSTALLED 2
+#define SOLVER_REASON_RESOLVE_JOB 3
+#define SOLVER_REASON_UPDATE_INSTALLED 4
+#define SOLVER_REASON_CLEANDEPS_ERASE 5
+#define SOLVER_REASON_RESOLVE 6
+#define SOLVER_REASON_WEAKDEP 7
+#define SOLVER_REASON_RESOLVE_ORPHAN 8
+
+#define SOLVER_REASON_RECOMMENDED 16
+#define SOLVER_REASON_SUPPLEMENTED 17
+
+
+#define SOLVER_FLAG_ALLOW_DOWNGRADE 1
+#define SOLVER_FLAG_ALLOW_ARCHCHANGE 2
+#define SOLVER_FLAG_ALLOW_VENDORCHANGE 3
+#define SOLVER_FLAG_ALLOW_UNINSTALL 4
+#define SOLVER_FLAG_NO_UPDATEPROVIDE 5
+#define SOLVER_FLAG_SPLITPROVIDES 6
+#define SOLVER_FLAG_IGNORE_RECOMMENDED 7
+#define SOLVER_FLAG_ADD_ALREADY_RECOMMENDED 8
+#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
+#define SOLVER_FLAG_NO_AUTOTARGET 13
+#define SOLVER_FLAG_DUP_ALLOW_DOWNGRADE 14
+#define SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE 15
+#define SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE 16
+#define SOLVER_FLAG_DUP_ALLOW_NAMECHANGE 17
+#define SOLVER_FLAG_KEEP_ORPHANS 18
+#define SOLVER_FLAG_BREAK_ORPHANS 19
+#define SOLVER_FLAG_FOCUS_INSTALLED 20
+#define SOLVER_FLAG_YUM_OBSOLETES 21
+
+#define GET_USERINSTALLED_NAMES (1 << 0) /* package names instead if ids */
+#define GET_USERINSTALLED_INVERTED (1 << 1) /* autoinstalled */
+
+extern Solver *solver_create(Pool *pool);