From d5700b8579a9a8756b0a0e4b1ae801322593d28b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 8 Dec 2011 19:21:13 -0800 Subject: [PATCH] load_emerge_config: init portage.data earlier The portage_uid initialization here must to happend before the _init_dirs() calls. --- pym/_emerge/actions.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 2849598d3..54c97743d 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2987,19 +2987,22 @@ def load_emerge_config(trees=None): kwargs[k] = v trees = portage.create_trees(trees=trees, **kwargs) - for root, root_trees in trees.items(): - settings = root_trees["vartree"].settings - settings._init_dirs() - setconfig = load_default_config(settings, root_trees) - root_trees["root_config"] = RootConfig(settings, root_trees, setconfig) - settings = trees[trees._target_eroot]['vartree'].settings mtimedbfile = os.path.join(settings['EROOT'], portage.CACHE_PATH, "mtimedb") mtimedb = portage.MtimeDB(mtimedbfile) portage.output._init(config_root=settings['PORTAGE_CONFIGROOT']) + # The portage_uid initialization here must to happend before + # the _init_dirs() calls below. portage.data._init(settings) QueryCommand._db = trees - return settings, trees, mtimedb + + for root, root_trees in trees.items(): + settings = root_trees["vartree"].settings + settings._init_dirs() + setconfig = load_default_config(settings, root_trees) + root_trees["root_config"] = RootConfig(settings, root_trees, setconfig) + + return trees[trees._target_eroot]['vartree'].settings, trees, mtimedb def chk_updated_cfg_files(eroot, config_protect): target_root = eroot -- 2.26.2