1LIBSOLV(3) LIBSOLV LIBSOLV(3)
2
3
4
6 libsolv - package dependency solver library using a satisfiability
7 algorithm
8
10 The libsolv documentation is split into multiple parts:
11
12 libsolv-history
13 how the libsolv library came into existence
14
15 libsolv-constantids
16 fixed Ids for often used strings
17
18 libsolv-bindings
19 access libsolv from perl/python/ruby
20
21 libsolv-pool
22 libsolv’s pool object
23
25 Note that all pointers to objects that have an Id have only a limited
26 validity period, with the exception of Repo pointers. They are only
27 guaranteed to be valid until a new object of that type is added or an
28 object of that type is removed. Thus pointers to Solvable objects are
29 only valid until another solvable is created, because adding a Solvable
30 may relocate the Pool’s Solvable array. This is also true for Pool
31 strings, you should use solv_strdup() to create a copy of the string if
32 you want to use it at some later time. You should use the Ids in the
33 code and not the pointers, except for short times where you know that
34 the pointer is safe.
35
36 Note also that the data lookup functions or the dataiterator also
37 return values with limited lifetime, this is especially true for data
38 stored in the paged data segment of solv files. This is normally data
39 that consists of big strings like package descriptions or is not often
40 needed like package checksums. Thus looking up a description of a
41 solvable and then looking up the description of a different solvable or
42 even the checksum of the same solvable may invalidate the first result.
43 (The dataiterator supports a dataiterator_strdup() function to create a
44 safe copy.)
45
46 The language bindings already deal with pointer validity, so you do not
47 have to worry about this issue when using the bindings.
48
50 Michael Schroeder <mls@suse.de>
51
52
53
54libsolv 03/02/2022 LIBSOLV(3)