Gentoo Archives: gentoo-portage-dev

From: Andy Kittner <andkit@×××.de>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Portage API questions
Date: Mon, 29 Jun 2009 20:00:19
Message-Id: 20090629195930.GA18954@archvile.hell
In Reply to: [gentoo-portage-dev] Portage API questions by Sebastian Pipping
1 On Mon, Jun 29, 2009 at 05:00:10AM +0200, Sebastian Pipping wrote:
2
3 Hi,
4
5 first I should note that I'm not involved with the development of
6 portage so take everything I write with a good grain of salt ;)
7
8 >I come here to ask for precise pointers related to
9 >gathering these sets of data:
10 >
11 > - publically known distfile mirror URLs
12 > - publically known global use flags
13 I assume you mean only the stuff the user has overridden, not collapsed
14 together with the corresponding files in the profiles?
15 > - entries for package.keywords
16 > - entries for package.mask
17 > - entries for package.unmask
18 > - entries for package.use
19
20 > - installed packages with version numbers
21 > - entries for /var/lib/portage/world
22 > - available local use for ebuild file F
23 > - applied use flags for installed package P
24 As I had a few minutes of spare time, and I'm much better at writing
25 code than explaining stuff I hacked together a small script that
26 showcases the API's I would use to get at the above data. (see
27 attachment)
28
29 >
30 >So my two questions are:
31 >
32 > - Which of these sets of data can be obtained
33 > through the Portage API, which of them not?
34 Unless I forgot something, or made some stupid mistake all of them ;)
35 >
36 > - Which classes and functions should I look at?
37 As you can see in the attached script, most of the interesting stuff is
38 either available through a portage.config instance, or via the
39 applicable dbapi (porttree for anything that can be installed, vartree
40 for anything regarding installed packages, etc.)
41
42
43
44 Best regards,
45 Andy
46
47 --
48 We all know that no one understands anything that isn't funny.

Attachments

File name MIME type
stuff.py text/x-python

Replies

Subject Author
Re: [gentoo-portage-dev] Portage API questions Sebastian Pipping <webmaster@××××××××.org>
Re: [gentoo-portage-dev] Portage API questions Sebastian Pipping <webmaster@××××××××.org>