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 18:10:45 +0000 (10:10 -0800)
pym/portage/package/ebuild/config.py

index ffe1fe988fc7670c666e921ac3261a0d5143976a..d4c69f805fa74620c235cce05da749b20c94e5ba 100644 (file)
@@ -2049,7 +2049,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')):