Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-osx
Lists: gentoo-osx: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-osx@g.o
From: Grobian <grobian@g.o>
Subject: Re: [PREFIX] calling portage within eclass/ebuilds
Date: Fri, 28 Apr 2006 21:59:15 +0200

I'm really delighted to see you diving this deep into the code.
Unfortunately I can't really tell you anything useful here.  Kito is the
man with the knowledge here.

As far as the webapp eclass concerns, if I recall correctly, there are
some nasty things going in there, like calling emerge, but I think the
problem you have is sort of generic.

On 28-04-2006 11:45:30 -0700, Christopher Chan wrote:
> Hi all,
> I've been working to get phpBB (along with webapp.eclass & webapp-config) to
> work in prefixed environment.  I've succeeded in getting those things
> working and deployed in prefix, but during that process, I discovered
> problems with scripts or commands that use portage within an ebuild or
> eclass.
> In my case, webapp.eclass uses webapp-config, and it imports portage.  But
> portage sets 'root' from ROOT environment variable and we, in turn, append
> EPREFIX to it.  This does not work within an eclass or ebuild because ROOT
> already has the EPREFIX so webapp-config fails.  I also noticed that
> has_version() eventually calls portageq which has the same problem.
> Has anyone else ran into this scenario?
> In any case, I hacked to reset root to '/' if ROOT = EPREFIX
> Looks like this:
> if os.environ.has_key("ROOT"):
>         root=os.environ["ROOT"]
> +
> +    ## cchan - HACK for when portage is being called within an
> ebuild/eclass
> +       if root == portage_const.EPREFIX: root="/"
> +        
>         if not len(root):
>                 root="/"
>         elif root[-1]!="/":
> Thoughts from others?
> BTW, I would be happy to submit my work on webapp.eclass, webapp-config, and
> other ebuilds.

Fabian Groffen
Gentoo for Mac OS X Project
gentoo-osx@g.o mailing list

[PREFIX] calling portage within eclass/ebuilds
-- Christopher Chan
Lists: gentoo-osx: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
[PREFIX] calling portage within eclass/ebuilds
Next by thread:
[PREFIX] small bug in emerge --sync
Previous by date:
Re: [PREFIX] small bug in emerge --sync
Next by date:
Re: [PREFIX] small bug in emerge --sync

Updated Jun 17, 2009

Summary: Archive of the gentoo-osx mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.