diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-22 21:31:23 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-22 21:31:23 +0000 |
commit | 66a25ee0b933016d5ffdb96326bb15cd1ef7b6b9 (patch) | |
tree | 52a0c5d82c12e2f4808088d06bc9577680de778c | |
parent | 55e481e91abdb81e8f50ecd0582eccc1009ed096 (diff) | |
download | portage-66a25ee0b933016d5ffdb96326bb15cd1ef7b6b9.tar.gz portage-66a25ee0b933016d5ffdb96326bb15cd1ef7b6b9.tar.bz2 portage-66a25ee0b933016d5ffdb96326bb15cd1ef7b6b9.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.
svn path=/main/trunk/; revision=13143
-rw-r--r-- | pym/portage/__init__.py | 11 |
1 files 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: |