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.
11-04-2010, 02:24 PM
Alan Hourihane
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.
11-04-2010, 05:05 PM
Fabian Groffen
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
11-05-2010, 10:48 PM
Alan Hourihane
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.
11-05-2010, 11:14 PM
Alan Hourihane
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.
11-07-2010, 04:11 PM
Fabian Groffen
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
11-07-2010, 10:15 PM
Alan Hourihane
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.
11-07-2010, 10:16 PM
Alan Hourihane
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.
11-08-2010, 06:40 AM
Fabian Groffen
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
11-25-2010, 10:19 PM
Alan Hourihane
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"] != "":