config.environ: filter calling env only if mycpv
authorZac Medico <zmedico@gentoo.org>
Thu, 25 Nov 2010 17:27:19 +0000 (09:27 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 25 Nov 2010 17:27:19 +0000 (09:27 -0800)
pym/portage/package/ebuild/config.py

index 043a310b835aeb35b706d40e64eff052318974c0..3c66d80472081d85c8a59e13ed882364055df29b 100644 (file)
@@ -2008,7 +2008,8 @@ class config(object):
                eapi = self.get('EAPI')
                phase = self.get('EBUILD_PHASE')
                filter_calling_env = False
-               if phase not in ('clean', 'cleanrm', 'depend', 'fetch'):
+               if self.mycpv is not None and \
+                       phase not in ('clean', 'cleanrm', 'depend', 'fetch'):
                        temp_dir = self.get('T')
                        if temp_dir is not None and \
                                os.path.exists(os.path.join(temp_dir, 'environment')):