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