1 |
On Tue, 2005-08-23 at 08:28 +0900, Jason Stubbs wrote: |
2 |
> On Tuesday 23 August 2005 06:40, Brian Harring wrote: |
3 |
> > On Mon, Aug 22, 2005 at 11:33:23PM +0200, Marius Mauch wrote: |
4 |
> > > Theoretical discussions about this are pointless IMO without |
5 |
> > > numbers/facts to back things up. |
6 |
> > |
7 |
> > I'd posit theroetical discussions about this are pointless without |
8 |
> > getting ebuild dev's to give a yay/nay on whether they want it or not; |
9 |
> > not much for trying to force it down their throats if they don't want |
10 |
> > it (more work, essentially). |
11 |
> |
12 |
> I don't really see what it has to do with ebuild devs... We're talking about |
13 |
> the user's environment leaking into the portage build environment, no? |
14 |
> Environment vars used by ebuilds can/should be set by users in a portage |
15 |
> configuration file rather than being added to the environment. The only |
16 |
> issue i see here is user customizations - fex, a hypothetical colorgcc that |
17 |
> gets its config info from the env. |
18 |
|
19 |
That's exactly what I was saying, we filter the environment to let only |
20 |
portage's variables (USE, FEATURE, ...) pass through. But the user may |
21 |
specify a bunch variables that will pass through. Ex: |
22 |
|
23 |
$ FOO=bar USE=X emerge vim |
24 |
|
25 |
vim's ebuild wont see the variable FOO but will see USE. |
26 |
But if someone run: |
27 |
|
28 |
$ PORTAGE_USER_VARS="FOO" FOO=bar USE=X emerge vim |
29 |
|
30 |
The ebuild will see both FOO and USE. |
31 |
But suppose that foo has 10 depencies and I want FOO to be defined only |
32 |
for vim. I can write /etc/portage/package.env.d/app-editors/vim: |
33 |
|
34 |
BAR=$TMP/bar |
35 |
FOO=$BAR/foo |
36 |
PORTAGE_USER_VARS="$PORTAGE_USER_VARS FOO" |
37 |
|
38 |
Then if I run: |
39 |
|
40 |
$ TMP=/home/me USE=X emerge vim |
41 |
|
42 |
The ebuild will see both USE and FOO but not BAR and TMP. |
43 |
|
44 |
It could also be only one file (/etc/portage/package.env): |
45 |
|
46 |
app-editors/vim "FOO BAR" |
47 |
app-... |
48 |
|
49 |
then FOO and BAR will be defined when running the ebuild if defined in |
50 |
the env. |
51 |
|
52 |
Or: |
53 |
|
54 |
app-editors/vim 'FOO=bar BAR="bla bla"' |
55 |
|
56 |
|
57 |
Which one do you prefer ? |
58 |
|
59 |
|
60 |
I think this give more freedom to the user than white/blacklisting and |
61 |
provide clean environment to the ebuilds. Plus no need for the package |
62 |
managers to manage white/blacklist. |
63 |
|
64 |
|
65 |
Kristian |
66 |
|
67 |
-- |
68 |
gentoo-portage-dev@g.o mailing list |