Gentoo Archives: gentoo-alt

From: Fabian Groffen <grobian@g.o>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] export EPREFIX in startprefix script
Date: Mon, 15 Nov 2010 08:27:32
Message-Id: 20101115082722.GB19971@gentoo.org
In Reply to: Re: [gentoo-alt] export EPREFIX in startprefix script by Markus Duft
1 On 15-11-2010 08:51:59 +0100, Markus Duft wrote:
2 > On 11/14/2010 09:44 PM, Konstantin Tokarev wrote:
3 > > I propose to export variable $EPREFIX in startprefix script to make it visible in shell after running it (for use in scripts)
4 > >
5 >
6 > for use in scripts you can use
7 >
8 > $ portageq envvar EPREFIX
9 >
10 > this is safer than exporting EPREFIX. having EPREFIX in the environment has some bad
11 > side effects (although my brain fails on me atm for what the problems where ;))
12
13 One of those "side-effects" is that no script installed by Gentoo Prefix
14 should rely on the existence of EPREFIX in the environment. Setting it
15 for all of us, will make any of these errors invisible.
16
17 Second, is that setting EPREFIX (currently still) results in Portage
18 trying to do "cross-EPREFIX" stuff, so in general, it should be unset,
19 unless you know what you're doing.
20
21 I agree with Markus, that if you really need EPREFIX in one of your own
22 scripts, just retrieve it from Portage, or, if your script is installed
23 by Portage, hardcode the (default value of) EPREFIX using eprefixify and
24 @GENTOO_PORTAGE_EPREFIX@ in your script.
25
26
27 --
28 Fabian Groffen
29 Gentoo on a different level