summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-10-09 23:29:54 +0000
committerZac Medico <zmedico@gentoo.org>2008-10-09 23:29:54 +0000
commit462b4508a6914422a98e43b67e5faf630eafb4e3 (patch)
tree5efd0e020a3884485473a2ad4406bb4bb88a7225
parent438f4bd433cf43b136451eae85e71120ec2b755d (diff)
downloadportage-462b4508a6914422a98e43b67e5faf630eafb4e3.tar.gz
portage-462b4508a6914422a98e43b67e5faf630eafb4e3.tar.bz2
portage-462b4508a6914422a98e43b67e5faf630eafb4e3.zip
Grab make.globals from GLOBAL_CONFIG_PATH if available and fall back to the
legacy location if necessary. svn path=/main/trunk/; revision=11669
-rw-r--r--pym/portage/__init__.py7
1 files changed, 5 insertions, 2 deletions
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 = {}