From 462b4508a6914422a98e43b67e5faf630eafb4e3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 9 Oct 2008 23:29:54 +0000 Subject: Grab make.globals from GLOBAL_CONFIG_PATH if available and fall back to the legacy location if necessary. svn path=/main/trunk/; revision=11669 --- pym/portage/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pym') 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 = {} -- cgit v1.2.3-1-g7c22