Gentoo Archives: gentoo-dev

From: Marius Mauch <genone@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Portage Toys
Date: Wed, 06 Oct 2004 23:59:41
Message-Id: 20041007015922.3e403f96@andy.genone.homeip.net
In Reply to: Re: [gentoo-dev] Portage Toys by Ned Ludd
1 On 10/06/04 Ned Ludd wrote:
2
3 > On Wed, 2004-10-06 at 18:53, Jason Stubbs wrote:
4 > > On Thursday 07 October 2004 06:29, Michael Tindal wrote:
5 > > > On Wed, 2004-10-06 at 19:57 +0900, Jason Stubbs wrote:
6 > > > > On Wednesday 06 October 2004 12:09, Michael Tindal wrote:
7 > > > > > The format is something like
8 > > > > > category/pkgname
9 > > > > > CFLAGS="...";LDFLAGS="...";USE="...";FEATURES="..."
10 > > > >
11 > > > > Unless you like things not compiling due to missing
12 > > > > dependencies, don't use USE in this file. Same deal with
13 > > > > ACCEPT_KEYWORDS and anything else that could possibly affect
14 > > > > dependencies (which is nothing that I can think of at this
15 > > > > stage).
16 > > >
17 > > > That wasn't really the point of the exercise (USE and the like).
18 > > > Portage already has files for that, so using this for that is
19 > > > pointless. It was more for CFLAGS and LDFLAGS and such, and the
20 > > > example I gave was off the top of my head.
21 > >
22 > > No problem. I was mostly just pointing it out for the onlookers and
23 > > to preempt invalid bug reports. Also worth pointing out is that most
24 > > FEATURES would not be honoured as well, as bashrc is only used on
25 > > the bash side of things whereas the python side of portage handles
26 > > most of them.
27 >
28 > Portage learns about FEATURES after it's sourced the ebuild in the
29 > depend phase right?
30 > If so then it would seem that those functions-FEATURES/USE which have
31 > todo with depgraph creation could be exported in the 'depend' phase
32 > from a bashrc. Is my logic incorrect?
33
34 Yes. The variables that affect the python side (which includes depgraph
35 stuff) come from the portage.config class which is initialized when
36 'import portage' is called. Also ebuild.sh (including your bashrc) is a
37 subprocess of emerge (including portage.py and the config class) and to
38 my knowledge you can't just export env-variables to the parent process,
39 so you'd need a more advanced communication.
40
41 Marius