Bug #273643 - Don't export AA in EAPI 3. Thanks to Jonathan Callen <abcd@g.o>
authorZac Medico <zmedico@gentoo.org>
Sat, 17 Oct 2009 07:24:43 +0000 (07:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 17 Oct 2009 07:24:43 +0000 (07:24 -0000)
for the initial patch (I moved the code from spawnebuild to  config.environ).

svn path=/main/trunk/; revision=14624

pym/portage/__init__.py

index 2454fbb4f432fdffe2f70f3e7ae798970a6a2a4a..f4760ec57cf5fd371d8382abcaff39e2cefecd2a 100644 (file)
@@ -3699,6 +3699,7 @@ class config(object):
                mydict={}
                environ_filter = self._environ_filter
 
+               eapi = self.get('EAPI')
                phase = self.get('EBUILD_PHASE')
                filter_calling_env = False
                if phase not in ('clean', 'cleanrm', 'depend'):
@@ -3743,6 +3744,10 @@ class config(object):
                # Filtered by IUSE and implicit IUSE.
                mydict["USE"] = self.get("PORTAGE_USE", "")
 
+               # Don't export AA to the ebuild environment in EAPIs that forbid it
+               if eapi not in ("0", "1", "2"):
+                       mydict.pop("AA", None)
+
                # sandbox's bashrc sources /etc/profile which unsets ROOTPATH,
                # so we have to back it up and restore it.
                rootpath = mydict.get("ROOTPATH")