From 66a25ee0b933016d5ffdb96326bb15cd1ef7b6b9 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 22 Mar 2009 21:31:23 +0000 Subject: [PATCH] =?utf8?q?Inside=20config.environ(),=20skip=20stat=20call?= =?utf8?q?=20on=20$T/environment=20for=20phases=20such=20as=20'clean'=20an?= =?utf8?q?d=20'depend'=20where=20environment=20filtering=20isn't=20needed.?= =?utf8?q?=20Thanks=20to=20Piotr=20Jaroszy=C5=84ski=20=20for=20?= =?utf8?q?reporting.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit svn path=/main/trunk/; revision=13143 --- pym/portage/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index c09fd552b..020a1a7ac 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -2987,11 +2987,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"] @@ -3017,7 +3019,6 @@ class config(object): mydict["HOME"]=mydict["BUILD_PREFIX"][:] if filter_calling_env: - phase = self.get("EBUILD_PHASE") if phase: whitelist = [] if "rpm" == phase: -- 2.26.2