From: Zac Medico Date: Thu, 9 Oct 2008 23:29:54 +0000 (-0000) Subject: Grab make.globals from GLOBAL_CONFIG_PATH if available and fall back to the X-Git-Tag: v2.2_rc13~107 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=462b4508a6914422a98e43b67e5faf630eafb4e3;p=portage.git Grab make.globals from GLOBAL_CONFIG_PATH if available and fall back to the legacy location if necessary. svn path=/main/trunk/; revision=11669 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 8e6744782..38724fc45 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -1343,8 +1343,11 @@ class config(object): # make.globals should not be relative to config_root # because it only contains constants. - self.mygcfg = getconfig(os.path.join("/etc", "make.globals"), - expand=expand_map) + for x in (portage.const.GLOBAL_CONFIG_PATH, "/etc"): + self.mygcfg = getconfig(os.path.join(x, "make.globals"), + expand=expand_map) + if self.mygcfg: + break if self.mygcfg is None: self.mygcfg = {}