1 |
I would suggest a different way of updates. When you manually change portage |
2 |
tree, you have to make an overlay. Overlay, as it's updated and managed by |
3 |
human being, will be always small (unless someone makes a script, which |
4 |
creates million overlay updates, but I dont think it would be efficient way |
5 |
to do anything). So, when you search, you can search Portage tree with |
6 |
index, which is updated with --sync and then search overlay, which is small |
7 |
and fast to search anyway. Overlay should not have index in such case. If |
8 |
anyone is going to change portage tree by hand, those changes will be lost |
9 |
with next --sync and thus noone should do it anyway - this case should not |
10 |
be considered at all. |
11 |
|
12 |
Tambet - technique evolves to art, art evolves to magic, magic evolves to |
13 |
just doing. |
14 |
|
15 |
|
16 |
2008/12/1 Emma Strubell <emma.strubell@×××××.com> |
17 |
|
18 |
> Thanks for the clarification. I was planning on forcing an update of the |
19 |
> index as a part of emerge --sync, and implementing a command that would |
20 |
> update the search index (leaving it up to the user to update after making |
21 |
> any manual changes to the portage tree). That way the search index should |
22 |
> always be up-to-date when emerge -s is called. It does make sense for the |
23 |
> update upon --sync to be optional, but I guess I don't see why the update |
24 |
> should always be SO slow. Of course the first population of the tree will |
25 |
> take quite a while, but assuming regular (daily?) --syncs (and therefore |
26 |
> updates to the index), subsequent updates shouldn't take very long, since |
27 |
> there will only be a few (hundred?) changes to be made to the tree. |
28 |
> |
29 |
> And I do plan on using a pickling the search tree :] |
30 |
> |
31 |
> Emma |
32 |
> |
33 |
> |
34 |
> On Mon, Dec 1, 2008 at 12:52 PM, Zac Medico <zmedico@g.o> wrote: |
35 |
> |
36 |
>> -----BEGIN PGP SIGNED MESSAGE----- |
37 |
>> Hash: SHA1 |
38 |
>> |
39 |
>> Emma Strubell wrote: |
40 |
>> > I completely forgot about Google's Summer of Code! Thanks for reminding |
41 |
>> me. |
42 |
>> > Hopefully I won't forget again by the time summer rolls around, |
43 |
>> obviously I |
44 |
>> > wouldn't mind getting a little extra money for doing something I'd do |
45 |
>> for |
46 |
>> > free anyway. |
47 |
>> > |
48 |
>> > On a more related note: What, exactly, does porttree.py do? And am I |
49 |
>> correct |
50 |
>> > in thinking that my suffix tree(s) should somewhat replace porttree.py? |
51 |
>> Or, |
52 |
>> > should I be using porttree.py in order to populate my tree? |
53 |
>> |
54 |
>> You should use portree.py to populate it. Specifically, you should |
55 |
>> use portdbapi.aux_get() calls to access the package metadata that |
56 |
>> you'll need, similar to how the code in the existing search class |
57 |
>> accesses it. |
58 |
>> |
59 |
>> > I think I have |
60 |
>> > the suffix tree sufficiently figured out, I'm just trying to determine |
61 |
>> > where, exactly, the tree will fit in to the portage code, and what the |
62 |
>> best |
63 |
>> > way to populate it (with package names and some corresponding metadata) |
64 |
>> > would be. |
65 |
>> |
66 |
>> There are there possible times that I imagine a person might want to |
67 |
>> populate it: |
68 |
>> |
69 |
>> 1) Automatically after emerge --sync. This should not be mandatory |
70 |
>> since it will be somewhat time consuming and some users are very |
71 |
>> sensitive about --sync time. Note that FEATURES=metadate-transfer is |
72 |
>> disabled by default in the latest versions of portage, specifically |
73 |
>> to reduce --sync time. |
74 |
>> |
75 |
>> 2) On demand, when emerge --search is invoked. The calling user will |
76 |
>> need appropriate file system permissions in order to update the |
77 |
>> search index. |
78 |
>> |
79 |
>> 3) On request, by calling a command that is specifically designed to |
80 |
>> generate the search index. This could be a subcommand of emaint. |
81 |
>> |
82 |
>> For the index file format, it would be simplest to use a python |
83 |
>> pickle file, but you might choose another format if you'd like the |
84 |
>> index to be accessible without python and the portage API (probably |
85 |
>> not necessary). |
86 |
>> - -- |
87 |
>> Thanks, |
88 |
>> Zac |
89 |
>> -----BEGIN PGP SIGNATURE----- |
90 |
>> Version: GnuPG v2.0.9 (GNU/Linux) |
91 |
>> |
92 |
>> iEYEARECAAYFAkk0JFAACgkQ/ejvha5XGaONDACgixnmCh9Ei6MyUGIZXpiFt7F2 |
93 |
>> gqMAoOhf5H2uZHB7xhjecOcL0G3w/cqR |
94 |
>> =hFNz |
95 |
>> -----END PGP SIGNATURE----- |
96 |
>> |
97 |
>> |
98 |
> |