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] config protect behavior in prefix
Date: Tue, 16 May 2006 12:59:53 -0700
Hi,

I have a question on the config protect funcitonality in a prefixed 
environment.  

We typically set the CONFIG_PROTECT and CONFIG_PROTECT_MASK flags in the 
profile make.defaults, etc/make.globals, etc/make.conf, or environment 
variable.

If my prefix is '/opt/myprefix', I would expect to set my CONFIG_PROTECT 
to something like:

CONFIG_PROTECT="/opt/myprefix/etc 
/opt/myprefix/var/www/localhost/htdocs/mediawiki"

Basically, be explicit on the full path to be protected by portage.

But a closer look in the portage.py, it does some path manipulation 
which, to me, seems to be a bug and out of place.

This line defined mergedir as a prefixed directory path
self.mergedir = os.path.normpath(myroot+os.path.sep+portage_const.EPREFIX)

Then in updateprotect(), we append the contents of CONFIG_PROTECT to the 
prefixed mergedir.

    def updateprotect(self):
        #do some config file management prep
        self.protect=[]
        for x in string.split(self.settings["CONFIG_PROTECT"]):
            ppath=normalize_path(self.mergedir+x)+"/"
            if os.path.isdir(ppath):
                self.protect.append(ppath)

        self.protectmask=[]
        for x in string.split(self.settings["CONFIG_PROTECT_MASK"]):
            ppath=normalize_path(self.mergedir+x)+"/"
            if os.path.isdir(ppath):
                self.protectmask.append(ppath)
            #if it doesn't exist, silently skip it

So, it ends up with my path looking like 
'/opt/myprefix/opt/myprefix/etc', basically, double prefixed.  I believe 
the correct functionality would be to have the CONFIG_PROTECT 
directories be explicit with prefix instead of implicitly prepending to 
the list.   The original portage only appends to 'myroot' and uses the 
explicit paths in CONFIG_PROTECT.

Thought from others on what should be the behavior?
-- 
gentoo-osx@g.o mailing list


Navigation:
Lists: gentoo-osx: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Tool to add EAPI="prefix"
Next by thread:
[PREFIX] config protect behavior in prefix
Previous by date:
Re: Tool to add EAPI="prefix"
Next by date:
Re: Tool to add EAPI="prefix"


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.