On 15-11-2010 08:51:59 +0100, Markus Duft wrote:
> On 11/14/2010 09:44 PM, Konstantin Tokarev wrote:
> > I propose to export variable $EPREFIX in startprefix script to make it visible in shell after running it (for use in scripts)
> for use in scripts you can use
> $ portageq envvar EPREFIX
> this is safer than exporting EPREFIX. having EPREFIX in the environment has some bad
> side effects (although my brain fails on me atm for what the problems where
One of those "side-effects" is that no script installed by Gentoo Prefix
should rely on the existence of EPREFIX in the environment. Setting it
for all of us, will make any of these errors invisible.
Second, is that setting EPREFIX (currently still) results in Portage
trying to do "cross-EPREFIX" stuff, so in general, it should be unset,
unless you know what you're doing.
I agree with Markus, that if you really need EPREFIX in one of your own
scripts, just retrieve it from Portage, or, if your script is installed
by Portage, hardcode the (default value of) EPREFIX using eprefixify and
@GENTOO_PORTAGE_EPREFIX@ in your script.
Gentoo on a different level