Bug #298141 - Make /etc/portage/sets relative to PORTAGE_CONFIGROOT. Thanks
authorZac Medico <zmedico@gentoo.org>
Sun, 31 Jan 2010 22:21:15 +0000 (22:21 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 31 Jan 2010 22:21:15 +0000 (22:21 -0000)
to Martin Gysel (bearsh) <m.gysel@gmx.ch> for this patch.

svn path=/main/trunk/; revision=15307

cnf/sets.conf
pym/portage/sets/__init__.py

index 912eb706ba2f1b6d133163f668122f6fb2c7e3dc..f092c6a2fb72e75aba894d1791417014582ca0cd 100644 (file)
@@ -44,7 +44,7 @@ world-candidate = False
 [usersets]
 class = portage.sets.files.StaticFileSet
 multiset = true
-directory = /etc/portage/sets
+directory =  %(PORTAGE_CONFIGROOT)setc/portage/sets
 
 # Set to rebuild all packages that need a preserved lib that only remains due
 # to FEATURES=preserve-libs
index 78f2628bd8ef8f09c91e62a89881b0d30d3c522a..9c2b860112fd30e81794bdc1ed2bd6713dbfb15a 100644 (file)
@@ -34,7 +34,8 @@ class SetConfigError(Exception):
 
 class SetConfig(object):
        def __init__(self, paths, settings, trees):
-               self._parser = SafeConfigParser()
+               self._parser = SafeConfigParser(
+                       defaults={"PORTAGE_CONFIGROOT" : settings["PORTAGE_CONFIGROOT"]})
                self._parser.read(paths)
                self.errors = []
                self.psets = {}