1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Emma Strubell wrote: |
5 |
> I completely forgot about Google's Summer of Code! Thanks for reminding me. |
6 |
> Hopefully I won't forget again by the time summer rolls around, obviously I |
7 |
> wouldn't mind getting a little extra money for doing something I'd do for |
8 |
> free anyway. |
9 |
> |
10 |
> On a more related note: What, exactly, does porttree.py do? And am I correct |
11 |
> in thinking that my suffix tree(s) should somewhat replace porttree.py? Or, |
12 |
> should I be using porttree.py in order to populate my tree? |
13 |
|
14 |
You should use portree.py to populate it. Specifically, you should |
15 |
use portdbapi.aux_get() calls to access the package metadata that |
16 |
you'll need, similar to how the code in the existing search class |
17 |
accesses it. |
18 |
|
19 |
> I think I have |
20 |
> the suffix tree sufficiently figured out, I'm just trying to determine |
21 |
> where, exactly, the tree will fit in to the portage code, and what the best |
22 |
> way to populate it (with package names and some corresponding metadata) |
23 |
> would be. |
24 |
|
25 |
There are there possible times that I imagine a person might want to |
26 |
populate it: |
27 |
|
28 |
1) Automatically after emerge --sync. This should not be mandatory |
29 |
since it will be somewhat time consuming and some users are very |
30 |
sensitive about --sync time. Note that FEATURES=metadate-transfer is |
31 |
disabled by default in the latest versions of portage, specifically |
32 |
to reduce --sync time. |
33 |
|
34 |
2) On demand, when emerge --search is invoked. The calling user will |
35 |
need appropriate file system permissions in order to update the |
36 |
search index. |
37 |
|
38 |
3) On request, by calling a command that is specifically designed to |
39 |
generate the search index. This could be a subcommand of emaint. |
40 |
|
41 |
For the index file format, it would be simplest to use a python |
42 |
pickle file, but you might choose another format if you'd like the |
43 |
index to be accessible without python and the portage API (probably |
44 |
not necessary). |
45 |
- -- |
46 |
Thanks, |
47 |
Zac |
48 |
-----BEGIN PGP SIGNATURE----- |
49 |
Version: GnuPG v2.0.9 (GNU/Linux) |
50 |
|
51 |
iEYEARECAAYFAkk0JFAACgkQ/ejvha5XGaONDACgixnmCh9Ei6MyUGIZXpiFt7F2 |
52 |
gqMAoOhf5H2uZHB7xhjecOcL0G3w/cqR |
53 |
=hFNz |
54 |
-----END PGP SIGNATURE----- |