From: Zac Medico Date: Sat, 21 Aug 2010 20:43:49 +0000 (-0700) Subject: Add EPREFIX support to load_default_config(). X-Git-Tag: v2.2_rc68~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2c9fc148809491049e6e1083cdf802e7b69f881f;p=portage.git Add EPREFIX support to load_default_config(). --- 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)