From: Zac Medico Date: Fri, 9 Dec 2011 03:21:13 +0000 (-0800) Subject: load_emerge_config: init portage.data earlier X-Git-Tag: v2.2.0_alpha80~48 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d5700b8579a9a8756b0a0e4b1ae801322593d28b;p=portage.git load_emerge_config: init portage.data earlier The portage_uid initialization here must to happend before the _init_dirs() calls. --- 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