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: Christopher Chan <cchan@...>
Subject: [PREFIX] config protect behavior in prefix
Date: Tue, 16 May 2006 12:59:53 -0700

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

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

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


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

But a closer look in the, 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
        for x in string.split(self.settings["CONFIG_PROTECT"]):
            if os.path.isdir(ppath):

        for x in string.split(self.settings["CONFIG_PROTECT_MASK"]):
            if os.path.isdir(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

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.