Gentoo Archives: gentoo-dev

From: Oleg Letsinsky <letsinsky@×××××××.ru>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Perl interface to portage
Date: Mon, 03 Mar 2003 18:26:05
Message-Id: 20030303181744.GD444@avenger.localdomain
In Reply to: Re: [gentoo-dev] Perl interface to portage by Alain Penders
1 On Sun, Mar 02, 2003 at 06:51:56AM -0700, Alain Penders wrote:
2 >
3 > There currently is no real API to portage in any language. The best way to
4 > get information out of portage is using the new 'portageq' command line tool,
5 > which was designed for just that. portageq will also work on the upcoming
6 > portage 2.1, very few of the other interfaces will. If there's things you
7 > need to know from portage that portageq doesn't provide, let me know.
8 >
9
10 What I want is to write is a small script to help me manage my distfiles
11 "collection" - I'm on dial-up, so I usually have to download files first,
12 disconnect (to reduce my connection bills) and build then. But upgrading
13 packages is not the only thing I do with my PC, so I frequently forget
14 about files downloaded and which packages I wanted to upgrade last night
15 :). I also want to know about unfinished downloads, about distfiles I
16 don't need anymore (since they belong to obsolete ebuilds) - not a huge
17 set of functions, but would be really helpful. I want the script to be
18 more or less universal and "right" - i.e. no hardwired paths, so I need
19 the right (i.e. "already existing") way for a perl script to get a
20 portage variable - PORTDIR, DISTDIR is enough.
21
22 Thanks for pointing me to the portageq. But it doesn't, for example,
23 provide me with a value of DISTDIR variable. BTW, I think its current
24 parameters are kinda redundant - there is no real need for having
25 separate "gentoo_mirrors", "portdir" etc. parameters - something like
26 "--get-env=ENVNAME" would be just fine.
27
28 Thanks
29 --
30 May the bluebird of happiness twiddle your bits.
31
32 --
33 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Perl interface to portage Chris Smith <chris.rs@×××××××.nz>
Re: [gentoo-dev] Perl interface to portage Alain Penders <alain@g.o>