1 |
Author: zmedico |
2 |
Date: 2009-03-22 21:31:23 +0000 (Sun, 22 Mar 2009) |
3 |
New Revision: 13143 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/__init__.py |
7 |
Log: |
8 |
Inside config.environ(), skip stat call on $T/environment for phases such |
9 |
as 'clean' and 'depend' where environment filtering isn't needed. Thanks to |
10 |
Piotr Jaroszy?\197?\132ski <peper@g.o> for reporting. |
11 |
|
12 |
|
13 |
Modified: main/trunk/pym/portage/__init__.py |
14 |
=================================================================== |
15 |
--- main/trunk/pym/portage/__init__.py 2009-03-22 08:42:19 UTC (rev 13142) |
16 |
+++ main/trunk/pym/portage/__init__.py 2009-03-22 21:31:23 UTC (rev 13143) |
17 |
@@ -2987,11 +2987,13 @@ |
18 |
mydict={} |
19 |
environ_filter = self._environ_filter |
20 |
|
21 |
+ phase = self.get('EBUILD_PHASE') |
22 |
filter_calling_env = False |
23 |
- temp_dir = self.get("T") |
24 |
- if temp_dir is not None and \ |
25 |
- os.path.exists(os.path.join(temp_dir, "environment")): |
26 |
- filter_calling_env = True |
27 |
+ if phase not in ('clean', 'cleanrm', 'depend'): |
28 |
+ temp_dir = self.get('T') |
29 |
+ if temp_dir is not None and \ |
30 |
+ os.path.exists(os.path.join(temp_dir, 'environment')): |
31 |
+ filter_calling_env = True |
32 |
|
33 |
environ_whitelist = self._environ_whitelist |
34 |
env_d = self.configdict["env.d"] |
35 |
@@ -3017,7 +3019,6 @@ |
36 |
mydict["HOME"]=mydict["BUILD_PREFIX"][:] |
37 |
|
38 |
if filter_calling_env: |
39 |
- phase = self.get("EBUILD_PHASE") |
40 |
if phase: |
41 |
whitelist = [] |
42 |
if "rpm" == phase: |