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.
Buffers are allocated in blocks
STRING_BLOCK the hashtable for strings is resized in these steps STRINGSPACE_BLOCK increments size for string buffer
Rel Ids have the 31st bit set
The string representation of an edition is
'<e>:<v>-<r>'
An empty epoch is considered zero (0) An empty version is considered ? An empty release is considered ?
if (e1 != e2) return e1 < e2; else if (v1 != v2) return v1 < v2; else return r1 < r2;
Names can have editions and compared against editions.
In comparisons, empty values within the edition are treated as 'any'
Example:
'name-1.0-42' matches A, 'name-1:1.0' does not.
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.
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)