1 |
On Mon, Mar 03, 2003 at 09:17:44PM +0300, Oleg Letsinsky wrote: |
2 |
|
3 |
> What I want is to write is a small script to help me manage my distfiles |
4 |
> "collection" - I'm on dial-up, so I usually have to download files first, |
5 |
> disconnect (to reduce my connection bills) and build then. But upgrading |
6 |
> packages is not the only thing I do with my PC, so I frequently forget |
7 |
> about files downloaded and which packages I wanted to upgrade last night |
8 |
> :). I also want to know about unfinished downloads, about distfiles I |
9 |
> don't need anymore (since they belong to obsolete ebuilds) - not a huge |
10 |
> set of functions, but would be really helpful. I want the script to be |
11 |
> more or less universal and "right" - i.e. no hardwired paths, so I need |
12 |
> the right (i.e. "already existing") way for a perl script to get a |
13 |
> portage variable - PORTDIR, DISTDIR is enough. |
14 |
> |
15 |
> Thanks for pointing me to the portageq. But it doesn't, for example, |
16 |
> provide me with a value of DISTDIR variable. BTW, I think its current |
17 |
> parameters are kinda redundant - there is no real need for having |
18 |
> separate "gentoo_mirrors", "portdir" etc. parameters - something like |
19 |
> "--get-env=ENVNAME" would be just fine. |
20 |
|
21 |
The more recent versions of portageq have a command like that: |
22 |
|
23 |
portageq envvar ENVNAME |
24 |
|
25 |
However, I'd advise *against* using it. The main reason why you shouldn't |
26 |
query ENVNAME's like this is what you want to know might not be environment |
27 |
variables in a future version of portage, or their name/meaning might change, |
28 |
etc. |
29 |
|
30 |
As for distdir, I added a "distdir" option to portageq. It'll be available in |
31 |
the next portage release. |
32 |
|
33 |
Alain |
34 |
|
35 |
|
36 |
-- |
37 |
gentoo-dev@g.o mailing list |