1 |
Author: zmedico |
2 |
Date: 2009-03-23 02:20:15 +0000 (Mon, 23 Mar 2009) |
3 |
New Revision: 13160 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/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. (trunk r13143) |
11 |
|
12 |
Modified: main/branches/2.1.6/pym/portage/__init__.py |
13 |
=================================================================== |
14 |
--- main/branches/2.1.6/pym/portage/__init__.py 2009-03-23 02:19:59 UTC (rev 13159) |
15 |
+++ main/branches/2.1.6/pym/portage/__init__.py 2009-03-23 02:20:15 UTC (rev 13160) |
16 |
@@ -2977,11 +2977,13 @@ |
17 |
mydict={} |
18 |
environ_filter = self._environ_filter |
19 |
|
20 |
+ phase = self.get('EBUILD_PHASE') |
21 |
filter_calling_env = False |
22 |
- temp_dir = self.get("T") |
23 |
- if temp_dir is not None and \ |
24 |
- os.path.exists(os.path.join(temp_dir, "environment")): |
25 |
- filter_calling_env = True |
26 |
+ if phase not in ('clean', 'cleanrm', 'depend'): |
27 |
+ temp_dir = self.get('T') |
28 |
+ if temp_dir is not None and \ |
29 |
+ os.path.exists(os.path.join(temp_dir, 'environment')): |
30 |
+ filter_calling_env = True |
31 |
|
32 |
environ_whitelist = self._environ_whitelist |
33 |
env_d = self.configdict["env.d"] |
34 |
@@ -3007,7 +3009,6 @@ |
35 |
mydict["HOME"]=mydict["BUILD_PREFIX"][:] |
36 |
|
37 |
if filter_calling_env: |
38 |
- phase = self.get("EBUILD_PHASE") |
39 |
if phase: |
40 |
whitelist = [] |
41 |
if "rpm" == phase: |