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 = {} |