Imported Upstream version 0.6.24
[platform/upstream/libsolv.git] / src / solver.h
index 2ae9c8d..be240c9 100644 (file)
@@ -107,19 +107,13 @@ struct _Solver {
   /* our decisions: */
   Queue decisionq;                      /* >0:install, <0:remove/conflict */
   Queue decisionq_why;                 /* index of rule, Offset into rules */
+  Queue decisionq_reason;              /* reason for decision, indexed by level */
 
   Id *decisionmap;                     /* map for all available solvables,
                                         * = 0: undecided
                                         * > 0: level of decision when installed,
                                         * < 0: level of decision when conflict */
 
-  int decisioncnt_jobs;
-  int decisioncnt_update;
-  int decisioncnt_keep;
-  int decisioncnt_resolve;
-  int decisioncnt_weak;
-  int decisioncnt_orphan;
-
   /* learnt rule history */
   Queue learnt_why;
   Queue learnt_pool;
@@ -166,7 +160,9 @@ struct _Solver {
   int bestobeypolicy;                  /* true: stay in policy with the best rules */
   int noautotarget;                    /* true: do not assume targeted for up/dup jobs that contain no installed solvable */
   int focus_installed;                 /* true: resolve update rules first */
+  int focus_best;                      /* true: resolve job dependencies first */
   int do_yum_obsoletes;                        /* true: add special yumobs rules */
+  int urpmreorder;                     /* true: do special urpm package reordering */
 
   Map dupmap;                          /* dup these packages*/
   int dupmap_all;                      /* dup all packages */
@@ -199,6 +195,12 @@ struct _Solver {
   Map allowuninstallmap;               /* ok to uninstall those */
   int allowuninstall_all;
 
+  Queue *favorq;
+  Map favormap;                                /* favored / disfavored packages */
+  Map isdisfavormap;
+
+  int installedpos;                    /* for resolve_installed */
+  int do_extra_reordering;             /* reorder for future installed packages */
 #endif /* LIBSOLV_INTERNAL */
 };
 
@@ -229,6 +231,8 @@ typedef struct _Solver Solver;
 #define SOLVER_DROP_ORPHANED           0x0900
 #define SOLVER_USERINSTALLED           0x0a00
 #define SOLVER_ALLOWUNINSTALL          0x0b00
+#define SOLVER_FAVOR                   0x0c00
+#define SOLVER_DISFAVOR                        0x0d00
 
 #define SOLVER_JOBMASK                 0xff00
 
@@ -302,6 +306,8 @@ typedef struct _Solver Solver;
 #define SOLVER_FLAG_FOCUS_INSTALLED            20
 #define SOLVER_FLAG_YUM_OBSOLETES              21
 #define SOLVER_FLAG_NEED_UPDATEPROVIDE         22
+#define SOLVER_FLAG_URPM_REORDER               23
+#define SOLVER_FLAG_FOCUS_BEST                 24
 
 #define GET_USERINSTALLED_NAMES                        (1 << 0)        /* package names instead of ids */
 #define GET_USERINSTALLED_INVERTED             (1 << 1)        /* autoinstalled */
@@ -341,7 +347,6 @@ extern void solver_create_state_maps(Solver *solv, Map *installedmap, Map *confl
 
 extern void solver_calc_duchanges(Solver *solv, DUChanges *mps, int nmps);
 extern int solver_calc_installsizechange(Solver *solv);
-extern void solver_trivial_installable(Solver *solv, Queue *pkgs, Queue *res);
 
 extern void pool_job2solvables(Pool *pool, Queue *pkgs, Id how, Id what);
 extern int  pool_isemptyupdatejob(Pool *pool, Id how, Id what);
@@ -377,6 +382,9 @@ extern const char *solver_alternative2str(Solver *solv, int type, Id id, Id from
        continue;                                                               \
       else
 
+/* weird suse stuff */
+extern void solver_trivial_installable(Solver *solv, Queue *pkgs, Queue *res);
+
 #ifdef __cplusplus
 }
 #endif