1 |
Hi. |
2 |
|
3 |
I'm reading portage docs and sources at /usr/lib/portage trying to |
4 |
understand how portage persists information on 'available ports'. |
5 |
|
6 |
So, I'm reading /usr/lib/portage/bin/emerge: |
7 |
|
8 |
--- snip --- |
9 |
|
10 |
portdb = trees["porttree"].dbapi |
11 |
|
12 |
--- snip --- |
13 |
|
14 |
Where 'trees' is a parameter to 'search's object construction. |
15 |
|
16 |
|
17 |
But who really uses 'search class' is 'action_search' as we can see |
18 |
below: |
19 |
|
20 |
--- snip --- |
21 |
|
22 |
def action_search(settings, trees, myopts, myfiles, spinner): |
23 |
[...] |
24 |
searchinstance = search(settings, trees, |
25 |
spinner, "--searchdesc" in myopts, |
26 |
"--quiet" not in myopts, "--usepkg" in myopts, |
27 |
"--usepkgonly" in myopts) |
28 |
[...] |
29 |
|
30 |
|
31 |
--- snip --- |
32 |
|
33 |
Later in 'emerge' file we have |
34 |
|
35 |
--- snip --- |
36 |
action_search(settings, trees[settings["ROOT"]], |
37 |
--- snip --- |
38 |
|
39 |
... and so on ... |
40 |
|
41 |
I'm trying to track the calls, instantiations, etc to figure out how |
42 |
portage persists ports info. |
43 |
|
44 |
May someone give me some help on this ? How does portage do the |
45 |
searchs ? Walk into the ports tree and build some structure or store |
46 |
this info on some embedded database like berkeley db or sqlite ? |
47 |
|
48 |
Thanks in advance. |
49 |
|
50 |
-- |
51 |
João Macaíba <joao.macaiba@×××××.com> |
52 |
|
53 |
-- |
54 |
gentoo-portage-dev@l.g.o mailing list |