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