satsolver  0.17.2
The Pool

Pool Introduction

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.

Strings

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

Normal strings

stringspace + strings[id]

Rel expressions

stringspace + strings[Reldep->name]

Rel Ids have the 31st bit set

String -> Id

See Also
str2id

Id -> String

See Also
id2str

Edition

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

'<e>:<v>-<r>'

An empty epoch is considered zero (0) An empty version is considered ? An empty release is considered ?

Comparing editions

The following comparison rules apply

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:

A name without any edition is said to provide 'all editions'.

'name-1.0-42' matches A, 'name-1:1.0' does not.

RelDeps

A relation is the tuple (name, operator, edition) used to express dependencies on ranges.

Solvable

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.

Strings vs. Relations

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)