summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-23 02:20:15 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-23 02:20:15 +0000
commite0f6e327a88b649d54f450193946ca28bee43f25 (patch)
treefc1d8a3fb978f3cdded0acf97106b831d95b7ec1 /pym
parentRemove pointless usage of xrange(). Thanks to Douglass Anderson (diff)
downloadportage-multirepo-e0f6e327a88b649d54f450193946ca28bee43f25.tar.gz
portage-multirepo-e0f6e327a88b649d54f450193946ca28bee43f25.tar.bz2
portage-multirepo-e0f6e327a88b649d54f450193946ca28bee43f25.zip
Inside config.environ(), skip stat call on $T/environment for phases such
as 'clean' and 'depend' where environment filtering isn't needed. Thanks to Piotr JaroszyƄski <peper@g.o> for reporting. (trunk r13143) svn path=/main/branches/2.1.6/; revision=13160
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 7ff3ea02..ceed96cb 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2977,11 +2977,13 @@ class config(object):
mydict={}
environ_filter = self._environ_filter
+ phase = self.get('EBUILD_PHASE')
filter_calling_env = False
- temp_dir = self.get("T")
- if temp_dir is not None and \
- os.path.exists(os.path.join(temp_dir, "environment")):
- filter_calling_env = True
+ if phase not in ('clean', 'cleanrm', 'depend'):
+ temp_dir = self.get('T')
+ if temp_dir is not None and \
+ os.path.exists(os.path.join(temp_dir, 'environment')):
+ filter_calling_env = True
environ_whitelist = self._environ_whitelist
env_d = self.configdict["env.d"]
@@ -3007,7 +3009,6 @@ class config(object):
mydict["HOME"]=mydict["BUILD_PREFIX"][:]
if filter_calling_env:
- phase = self.get("EBUILD_PHASE")
if phase:
whitelist = []
if "rpm" == phase: