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