From e0f6e327a88b649d54f450193946ca28bee43f25 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 23 Mar 2009 02:20:15 +0000 Subject: =?UTF-8?q?Inside=20config.environ(),=20skip=20stat=20call=20on=20?= =?UTF-8?q?$T/environment=20for=20phases=20such=20as=20'clean'=20and=20'de?= =?UTF-8?q?pend'=20where=20environment=20filtering=20isn't=20needed.=20Tha?= =?UTF-8?q?nks=20to=20Piotr=20Jaroszy=C5=84ski=20=20for=20repor?= =?UTF-8?q?ting.=20(trunk=20r13143)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/main/branches/2.1.6/; revision=13160 --- 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 7ff3ea025..ceed96cb1 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: -- cgit v1.2.3-1-g7c22