summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-21 13:43:49 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-21 13:43:49 -0700
commit2c9fc148809491049e6e1083cdf802e7b69f881f (patch)
treea9a3cd6bd4fbcc8be2d678a547edbaca0b690b33
parentedc7b0e893b38cc95641441977770d3d937fcfdc (diff)
downloadportage-2c9fc148809491049e6e1083cdf802e7b69f881f.tar.gz
portage-2c9fc148809491049e6e1083cdf802e7b69f881f.tar.bz2
portage-2c9fc148809491049e6e1083cdf802e7b69f881f.zip
Add EPREFIX support to load_default_config().
-rw-r--r--pym/portage/sets/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/sets/__init__.py b/pym/portage/sets/__init__.py
index dc6661480..2f65f98bf 100644
--- a/pym/portage/sets/__init__.py
+++ b/pym/portage/sets/__init__.py
@@ -176,8 +176,12 @@ class SetConfig(object):
return myatoms
def load_default_config(settings, trees):
+ global_config_path = GLOBAL_CONFIG_PATH
+ if settings['EPREFIX']:
+ global_config_path = os.path.join(settings['EPREFIX'],
+ GLOBAL_CONFIG_PATH.lstrip(os.sep))
def _getfiles():
- for path, dirs, files in os.walk(os.path.join(GLOBAL_CONFIG_PATH, "sets")):
+ for path, dirs, files in os.walk(os.path.join(global_config_path, "sets")):
for f in files:
yield os.path.join(path, f)