|
Packit Service |
ff689b |
/*
|
|
Packit Service |
ff689b |
* Copyright (c) 2007, Novell Inc.
|
|
Packit Service |
ff689b |
*
|
|
Packit Service |
ff689b |
* This program is licensed under the BSD license, read LICENSE.BSD
|
|
Packit Service |
ff689b |
* for further information
|
|
Packit Service |
ff689b |
*/
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
/*
|
|
Packit Service |
ff689b |
* Generic policy interface for SAT solver
|
|
Packit Service |
ff689b |
* The policy* function can be "overloaded" by defining a callback in the solver struct.
|
|
Packit Service |
ff689b |
*/
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
#include "solver.h"
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
#ifdef __cplusplus
|
|
Packit Service |
ff689b |
extern "C" {
|
|
Packit Service |
ff689b |
#endif
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
#define POLICY_MODE_CHOOSE 0
|
|
Packit Service |
ff689b |
#define POLICY_MODE_RECOMMEND 1
|
|
Packit Service |
ff689b |
#define POLICY_MODE_SUGGEST 2
|
|
Packit Service |
ff689b |
#define POLICY_MODE_CHOOSE_NOREORDER 3 /* internal, do not use */
|
|
Packit Service |
ff689b |
#define POLICY_MODE_SUPPLEMENT 4 /* internal, do not use */
|
|
Packit Service |
ff689b |
#define POLICY_MODE_FAVOR_REC (1 << 30) /* internal, do not use */
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
#define POLICY_ILLEGAL_DOWNGRADE 1
|
|
Packit Service |
ff689b |
#define POLICY_ILLEGAL_ARCHCHANGE 2
|
|
Packit Service |
ff689b |
#define POLICY_ILLEGAL_VENDORCHANGE 4
|
|
Packit Service |
ff689b |
#define POLICY_ILLEGAL_NAMECHANGE 8
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
extern void policy_filter_unwanted(Solver *solv, Queue *plist, int mode);
|
|
Packit Service |
ff689b |
extern int policy_illegal_archchange(Solver *solv, Solvable *s1, Solvable *s2);
|
|
Packit Service |
ff689b |
extern int policy_illegal_vendorchange(Solver *solv, Solvable *s1, Solvable *s2);
|
|
Packit Service |
ff689b |
extern int policy_is_illegal(Solver *solv, Solvable *s1, Solvable *s2, int ignore);
|
|
Packit Service |
ff689b |
extern void policy_findupdatepackages(Solver *solv, Solvable *s, Queue *qs, int allowall);
|
|
Packit Service |
ff689b |
extern const char *policy_illegal2str(Solver *solv, int illegal, Solvable *s, Solvable *rs);
|
|
Packit Service |
ff689b |
extern void policy_update_recommendsmap(Solver *solv);
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
extern void policy_create_obsolete_index(Solver *solv);
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
extern void pool_best_solvables(Pool *pool, Queue *plist, int flags);
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
/* internal, do not use */
|
|
Packit Service |
ff689b |
extern void prune_to_best_version(Pool *pool, Queue *plist);
|
|
Packit Service |
ff689b |
extern void policy_prefer_favored(Solver *solv, Queue *plist);
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
|
|
Packit Service |
ff689b |
#ifdef __cplusplus
|
|
Packit Service |
ff689b |
}
|
|
Packit Service |
ff689b |
#endif
|