1 /** \page policies Policies in sat-solver
3 \section policiesdef Definition
5 Policies are assumptions (decisions) in the code not reasoned by
6 the dependency semantics.
9 \section policies-motivation Motivation
11 There are local policies, looking at a small set of packages during
14 - Prefer better architecture (i586/i686) over better version ?
17 There are global policies, looking at the complete transaction after
21 - Choose 'best' transaction.
22 - The smallest one - looking at the number of package changes ?
23 - The smallest one - looking at the download size ?
24 - The biggest one - looking at package versions ?
26 Global policies are currently not supported at all.
29 Generally, policies help the solver to choose from multiple
30 possibilities. In most cases, this can be represented as a filter
31 operation working on a list of candidates and filtering out unwanted
32 ones - ideally resulting in a single candidate.
35 \section policiesrecog Recognized policies
37 These are the policies we currently know of (which should be exposed
41 Is a version downgrade allowed ?
42 - explicit, by user request
43 - implicit, by dependencies
46 Should the solver try to uninstall packages in order to
47 satisfy dependencies ?
50 Can the package vendor change during an update
51 (i.e. replace an OpenSUSE package with a 'packman' one or vice versa)
54 Can the architecture change during an update
55 (i586 <-> i686, to/from noarch)
59 - Order for solving open dependencies
60 Look at requires before conflicts ?
63 \section policiesgenfilter Generic filter
65 The generic function is 'choose among multiple candidates' by
72 - transaction size (-> global policy)
73 - number of installed/updated/removed packages
74 - number of bytes downloaded
75 - best overall versions
78 \section policiesengineimpl Policy engine implementation
80 The policy engine should support policies in a generic way.
82 Some policies might be quite complex, it should be possible to build up
83 a policy chain - passing a result back to the default engine after
84 applying a specific filter.
86 Helper functions can help implementing policies, e.g.
91 \section policiesapi Policy engine API