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
Navigation:
Lists: gentoo-osx: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: <gentoo-osx@g.o>
From: "Christopher Chan" <cchan@...>
Subject: [PREFIX] calling portage within eclass/ebuilds
Date: Fri, 28 Apr 2006 11:45:30 -0700
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 portage.py 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.

-- 
gentoo-osx@g.o mailing list


Replies:
Re: [PREFIX] calling portage within eclass/ebuilds
-- Grobian
Navigation:
Lists: gentoo-osx: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
[PREFIX] first cut prefix.eclass
Next by thread:
Re: [PREFIX] calling portage within eclass/ebuilds
Previous by date:
Re: [PREFIX] first cut prefix.eclass
Next by date:
[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.