]> git.ipfire.org Git - thirdparty/libsolv.git/commit
Move decisionlist generation into the library
authorMichael Schroeder <mls@suse.de>
Fri, 25 Nov 2022 10:36:19 +0000 (11:36 +0100)
committerMichael Schroeder <mls@suse.de>
Fri, 25 Nov 2022 10:36:19 +0000 (11:36 +0100)
commit607511873490736fafca6dd9081fba5e3fce3e87
treeaaa5df38ac08c93f894cda186a5d49d2a34abd88
parent33350a8946b5ff7c478d8697cb82778cac53306a
Move decisionlist generation into the library

This functionality is useful for multiple programs that use
libsolv, so it does not make sense to duplicate the code
into each of them.

So we now offer solver_get_decisionlist() to get a list of
decisions that let to the installation/deinstallation of a
package. There is also solver_get_decisionlist_multiple() that
can be used if multiple packages should be considered.

The output is a list of (package, reason, info) triplets.
Package is positive for installs, negative for conflicts.

This commits also deprecates solver_describe_weakdep_decision().
it makes more sense to unify weakdep decisions with rule
decisions as both come from package dependencies.
So we now have solver_allweakdepinfos() and solver_weakdepinfo()
that returns the ruleinfo for a weakdep decision. You can then
use solver_ruleinfo2str() to convert the ruleinfo to a string.
src/libsolv.ver
src/rules.c
src/rules.h
src/solver.c