Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Alt (http://www.linux-archive.org/gentoo-alt/)
-   -   EROOT changing ? (http://www.linux-archive.org/gentoo-alt/447721-eroot-changing.html)

Alan Hourihane 11-03-2010 07:38 PM

EROOT changing ?
 
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 / ?

Thanks,

Alan.

Alan Hourihane 11-04-2010 02:24 PM

EROOT changing ?
 
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 ?

Alan.

Fabian Groffen 11-04-2010 05:05 PM

EROOT changing ?
 
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.


--
Fabian Groffen
Gentoo on a different level

Alan Hourihane 11-05-2010 10:48 PM

EROOT changing ?
 
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 .

Alan.

Alan Hourihane 11-05-2010 11:14 PM

EROOT changing ?
 
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 "."

Ouch.

Alan.

Fabian Groffen 11-07-2010 04:11 PM

EROOT changing ?
 
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"] != "":


--
Fabian Groffen
Gentoo on a different level

Alan Hourihane 11-07-2010 10:15 PM

EROOT changing ?
 
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.

Alan Hourihane 11-07-2010 10:16 PM

EROOT changing ?
 
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"] != "":

Couldn't this just be...

if os.environ["EPREFIX"] != "":

???

Alan.

Fabian Groffen 11-08-2010 06:40 AM

EROOT changing ?
 
On 07-11-2010 23:16:08 +0000, Alan Hourihane wrote:
> > Ok, would this work for you?
> >
> > if "EPREFIX" in os.environ and os.environ["EPREFIX"] != "":
>
> Couldn't this just be...
>
> if os.environ["EPREFIX"] != "":

In the original code, this would give a keyerror, if EPREFIX was/is not
exported. It may be that Portage now always exports it itself, in which
case the EPREFIX is always expanded nowadays. Needs investigation.


--
Fabian Groffen
Gentoo on a different level

Alan Hourihane 11-25-2010 10:19 PM

EROOT changing ?
 
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"] != "":

Can we add this for now ??

Alan.


All times are GMT. The time now is 07:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.