satsolver
0.17.2
|
The pool contains all information required for dependency solving.
Main purpose of the pool is efficient storage of data in terms of memory consumption and access time.
The pool is created by reading one or more 'sources', metadata repositories. The rpmdb (installed software) is passed explicit to the solver.
Pool has 'void *stringspace' pointing to allocated memory Pool has 'off_t strings[Id]', giving an offset into 'stringspace' for each Id
Buffers are allocated in blocks
STRING_BLOCK the hashtable for strings is resized in these steps STRINGSPACE_BLOCK increments size for string buffer
stringspace + strings[id]
stringspace + strings[Reldep->name]
Rel Ids have the 31st bit set
The edition is the combination of epoch (e), version (v) and release (r) and used for comparing package 'ages' (usually named versions)
The string representation of an edition is
An empty epoch is considered zero (0) An empty version is considered ? An empty release is considered ?
The following comparison rules apply
Names can have editions and compared against editions.
In comparisons, empty values within the edition are treated as 'any'
Example:
A name without any edition is said to provide 'all editions'.
'name-1.0-42' matches A, 'name-1:1.0' does not.
A relation is the tuple (name, operator, edition) used to express dependencies on ranges.
A solvable contains all package information required for dependency solving.
Solvables as referenced by Id, pointing into 'pool.solvables'. There are 'pool.nsolvables-1' number of solvables.
There is no solvable with Id 0, this Id is reserved and serves as an 'end' indicator in lists of solvables.
Relations (i.e. <name><flag><evr>) and Strings (<name>) are encoded as Ids. Relations have the 32th bit set. The pool contains a relation dictionary next to the string dictionary.
Here's an example
String dict: 2 -> bash 3 -> zlib 4 -> 1.2.3
Relation dict: 1 -> 3 >= 4 (i.e. zlib >= 1.2.3)
Some package provides: 2, 0x80000001 (i.e. bash, zlib >= 1.2.3)