oops, fix last commit
[platform/upstream/libsolv.git] / src / solver.h
index b735329..5fa0a12 100644 (file)
 #ifndef LIBSOLV_SOLVER_H
 #define LIBSOLV_SOLVER_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include "pooltypes.h"
 #include "pool.h"
 #include "repo.h"
@@ -26,6 +22,9 @@ extern "C" {
 #include "rules.h"
 #include "problems.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 struct _Solver {
   Pool *pool;                          /* back pointer to pool */
@@ -79,7 +78,7 @@ struct _Solver {
 
   Map noupdate;                                /* don't try to update these
                                            installed solvables */
-  Map noobsoletes;                     /* ignore obsoletes for these (multiinstall) */
+  Map multiversion;                    /* ignore obsoletes for these (multiinstall) */
 
   Map updatemap;                       /* bring these installed packages to the newest version */
   int updatemap_all;                   /* bring all packages to the newest version */
@@ -206,7 +205,7 @@ typedef struct _Solver Solver;
 #define SOLVER_ERASE                   0x0200
 #define SOLVER_UPDATE                  0x0300
 #define SOLVER_WEAKENDEPS                      0x0400
-#define SOLVER_NOOBSOLETES             0x0500
+#define SOLVER_MULTIVERSION            0x0500
 #define SOLVER_LOCK                    0x0600
 #define SOLVER_DISTUPGRADE             0x0700
 #define SOLVER_VERIFY                  0x0800
@@ -243,6 +242,9 @@ typedef struct _Solver Solver;
 
 #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
@@ -291,18 +293,19 @@ extern int  solver_describe_decision(Solver *solv, Id p, Id *infop);
 extern void solver_describe_weakdep_decision(Solver *solv, Id p, Queue *whyq);
 
 
-extern void solver_calculate_noobsmap(Pool *pool, Queue *job, Map *noobsmap);
+extern void solver_calculate_multiversionmap(Pool *pool, Queue *job, Map *multiversionmap);
+extern void solver_calculate_noobsmap(Pool *pool, Queue *job, Map *multiversionmap);   /* obsolete */
 extern void solver_create_state_maps(Solver *solv, Map *installedmap, Map *conflictsmap);
 
-/* XXX: why is this not static? */
-Id *solver_create_decisions_obsoletesmap(Solver *solv);
+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);
 
-void solver_calc_duchanges(Solver *solv, DUChanges *mps, int nmps);
-int solver_calc_installsizechange(Solver *solv);
-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);
 
-void pool_job2solvables(Pool *pool, Queue *pkgs, Id how, Id what);
-int  pool_isemptyupdatejob(Pool *pool, Id how, Id what);
+extern const char *solver_select2str(Pool *pool, Id select, Id what);
+extern const char *pool_job2str(Pool *pool, Id how, Id what, Id flagmask);
 
 /* iterate over all literals of a rule */
 #define FOR_RULELITERALS(l, pp, r)                             \