summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-01-31 22:21:15 +0000
committerZac Medico <zmedico@gentoo.org>2010-01-31 22:21:15 +0000
commit15f0c600dd226561c5345d813b3e9d6af21b41ee (patch)
treefddf223b8a6e85668c40a3950202cd7a2b645139
parent29d35fb5b64dd53b2fff0203b6c41befe7bdee2a (diff)
downloadportage-15f0c600dd226561c5345d813b3e9d6af21b41ee.tar.gz
portage-15f0c600dd226561c5345d813b3e9d6af21b41ee.tar.bz2
portage-15f0c600dd226561c5345d813b3e9d6af21b41ee.zip
Bug #298141 - Make /etc/portage/sets relative to PORTAGE_CONFIGROOT. Thanks
to Martin Gysel (bearsh) <m.gysel@gmx.ch> for this patch. svn path=/main/trunk/; revision=15307
-rw-r--r--cnf/sets.conf2
-rw-r--r--pym/portage/sets/__init__.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/cnf/sets.conf b/cnf/sets.conf
index 912eb706b..f092c6a2f 100644
--- a/cnf/sets.conf
+++ b/cnf/sets.conf
@@ -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
diff --git a/pym/portage/sets/__init__.py b/pym/portage/sets/__init__.py
index 78f2628bd..9c2b86011 100644
--- a/pym/portage/sets/__init__.py
+++ b/pym/portage/sets/__init__.py
@@ -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 = {}