Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11669 - main/trunk/pym/portage
Date: Thu, 09 Oct 2008 23:29:58
Message-Id: E1Ko4x9-0000eG-8p@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-10-09 23:29:54 +0000 (Thu, 09 Oct 2008)
3 New Revision: 11669
4
5 Modified:
6 main/trunk/pym/portage/__init__.py
7 Log:
8 Grab make.globals from GLOBAL_CONFIG_PATH if available and fall back to the
9 legacy location if necessary.
10
11
12 Modified: main/trunk/pym/portage/__init__.py
13 ===================================================================
14 --- main/trunk/pym/portage/__init__.py 2008-10-09 21:41:02 UTC (rev 11668)
15 +++ main/trunk/pym/portage/__init__.py 2008-10-09 23:29:54 UTC (rev 11669)
16 @@ -1343,8 +1343,11 @@
17
18 # make.globals should not be relative to config_root
19 # because it only contains constants.
20 - self.mygcfg = getconfig(os.path.join("/etc", "make.globals"),
21 - expand=expand_map)
22 + for x in (portage.const.GLOBAL_CONFIG_PATH, "/etc"):
23 + self.mygcfg = getconfig(os.path.join(x, "make.globals"),
24 + expand=expand_map)
25 + if self.mygcfg:
26 + break
27
28 if self.mygcfg is None:
29 self.mygcfg = {}