Portage persistence structures :: information about ports tree
Hi.
I'm reading portage docs and sources at /usr/lib/portage trying to understand how portage persists information on 'available ports'. So, I'm reading /usr/lib/portage/bin/emerge: --- snip --- portdb = trees["porttree"].dbapi --- snip --- Where 'trees' is a parameter to 'search's object construction. But who really uses 'search class' is 'action_search' as we can see below: --- snip --- def action_search(settings, trees, myopts, myfiles, spinner): [...] searchinstance = search(settings, trees, spinner, "--searchdesc" in myopts, "--quiet" not in myopts, "--usepkg" in myopts, "--usepkgonly" in myopts) [...] --- snip --- Later in 'emerge' file we have --- snip --- action_search(settings, trees[settings["ROOT"]], --- snip --- ... and so on ... I'm trying to track the calls, instantiations, etc to figure out how portage persists ports info. May someone give me some help on this ? How does portage do the searchs ? Walk into the ports tree and build some structure or store this info on some embedded database like berkeley db or sqlite ? Thanks in advance. -- João Macaíba <joao.macaiba@gmail.com> -- gentoo-portage-dev@lists.gentoo.org mailing list |
Portage persistence structures :: information about ports tree
On Mon, 09 Jun 2008 17:36:14 -0300
João Macaíba <joao.macaiba@gmail.com> wrote: > May someone give me some help on this ? How does portage do the > searchs ? Walk into the ports tree and build some structure or store > this info on some embedded database like berkeley db or sqlite ? You're probably looking for the portdbapi class defined in pym/portage.py (or pym/portage/dbapi/porttree.py in 2.2), in particular the cp_all(), cpv_all(), cp_list() and aux_get() methods. Marius -- gentoo-portage-dev@lists.gentoo.org mailing list |
Portage persistence structures :: information about ports tree
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 João Macaíba wrote: > May someone give me some help on this ? How does portage do the > searchs ? Walk into the ports tree and build some structure or store > this info on some embedded database like berkeley db or sqlite ? If you want to use sqlite, you might find this useful: http://gentoo-wiki.com/TIP_speed_up_portage_with_sqlite Zac -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkhN2tgACgkQ/ejvha5XGaMxqACgqCDf40D3UHrvrTsyGACfIPJ8 HgUAoKKeHLASAaO6KrJXW8jpCg/0dWin =r1mc -----END PGP SIGNATURE----- -- gentoo-portage-dev@lists.gentoo.org mailing list |
| All times are GMT. The time now is 10:10 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.