Gentoo Archives: gentoo-alt

From: Alan Hourihane <alanh@×××××××××××.uk>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] EROOT changing ?
Date: Sat, 06 Nov 2010 00:14:34
Message-Id: 1289002458.27741.3.camel@jetpack.demon.co.uk
In Reply to: Re: [gentoo-alt] EROOT changing ? by Alan Hourihane
1 On Fri, 2010-11-05 at 23:48 +0000, Alan Hourihane wrote:
2 > On Thu, 2010-11-04 at 19:05 +0100, Fabian Groffen wrote:
3 > > On 04-11-2010 15:24:47 +0000, Alan Hourihane wrote:
4 > > > On Wed, 2010-11-03 at 20:38 +0000, Alan Hourihane wrote:
5 > > > > Hi all,
6 > > > >
7 > > > > I'm having a recent issue where has_version is getting EROOT set to ./
8 > > > > where normally for me it's set to /
9 > > > >
10 > > > > When doing the autotools check for LATEST_VERSION it's failing during
11 > > > > the ebuild, yet calling portageq directly works. And in all other cases
12 > > > > it works fine too, just this autotools check.
13 > > > >
14 > > > > I've traced it back to vartree.py and when it pulls in the value of
15 > > > > EROOT it's wrong, and fails the search.
16 > > > >
17 > > > > Anyone any clues where EROOT could be getting set to ./ instead of just
18 > > > > staying with / ?
19 > > >
20 > > > Any help ?
21 > >
22 > > well, only puzzledness. I assume you don't have ROOT set. Maybe
23 > > canonicalise() is being called somewhere, but why that would introduce
24 > > the . (which is wrong of course) is unclear to me.
25 >
26 > I don't have ROOT, EROOT or EPREFIX set in my environment, but.....
27 >
28 > I printed out EPREFIX and ROOT where EROOT is used in vartree.py and it
29 > says that EPREFIX is set to . and ROOT is /
30 >
31 > Why would EPREFIX get set to .
32
33 Ah ha....
34
35 Turns out it's this in const.py.
36
37 # pick up EPREFIX from the environment if set
38 if "EPREFIX" in os.environ:
39 EPREFIX = os.path.normpath(os.environ["EPREFIX"])
40
41 If EPREFIX is "", then normpath turns EPREFIX into "."
42
43 Ouch.
44
45 Alan.

Replies

Subject Author
Re: [gentoo-alt] EROOT changing ? Fabian Groffen <grobian@g.o>