On Sun, 2010-11-07 at 18:11 +0100, Fabian Groffen wrote:
> On 06-11-2010 00:14:18 +0000, Alan Hourihane wrote:
> > On Fri, 2010-11-05 at 23:48 +0000, Alan Hourihane wrote:
> > > On Thu, 2010-11-04 at 19:05 +0100, Fabian Groffen wrote:
> > > > On 04-11-2010 15:24:47 +0000, Alan Hourihane wrote:
> > > > > On Wed, 2010-11-03 at 20:38 +0000, Alan Hourihane wrote:
> > > > > > Hi all,
> > > > > > 
> > > > > > I'm having a recent issue where has_version is getting EROOT set to 
> > > > > > ./
> > > > > > where normally for me it's set to /
> > > > > > 
> > > > > > When doing the autotools check for LATEST_VERSION it's failing 
> > > > > > during
> > > > > > the ebuild, yet calling portageq directly works. And in all other 
> > > > > > cases
> > > > > > it works fine too, just this autotools check.
> > > > > > 
> > > > > > I've traced it back to vartree.py and when it pulls in the value of
> > > > > > EROOT it's wrong, and fails the search.
> > > > > > 
> > > > > > Anyone any clues where EROOT could be getting set to ./ instead of 
> > > > > > just
> > > > > > staying with / ?
> > > > > 
> > > > > Any help ?
> > > > 
> > > > well, only puzzledness.  I assume you don't have ROOT set.  Maybe
> > > > canonicalise() is being called somewhere, but why that would introduce
> > > > the . (which is wrong of course) is unclear to me.
> > > 
> > > I don't have ROOT, EROOT or EPREFIX set in my environment, but.....
> > > 
> > > I printed out EPREFIX and ROOT where EROOT is used in vartree.py and it
> > > says that EPREFIX is set to . and ROOT is /
> > > 
> > > Why would EPREFIX get set to .
> > 
> > Ah ha....
> > 
> > Turns out it's this in const.py.
> > 
> > # pick up EPREFIX from the environment if set
> > if "EPREFIX" in os.environ:
> >         EPREFIX = os.path.normpath(os.environ["EPREFIX"])
> > 
> > If EPREFIX is "", then normpath turns EPREFIX into "."
> 
> Ok, would this work for you?
> 
> if "EPREFIX" in os.environ and os.environ["EPREFIX"] != "":

Yes.

Thanks,

Alan.


Reply via email to