Fix ebuild(1) so that src_configure is only called for EAPIs for which it
authorZac Medico <zmedico@gentoo.org>
Mon, 11 Aug 2008 20:20:25 +0000 (20:20 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 11 Aug 2008 20:20:25 +0000 (20:20 -0000)
is supported.

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

pym/portage/__init__.py

index e06dd8dad46364a1faa577a2e90b7997bd1849cd..d5b1867fa56de7f29c08d01940193669a956120d 100644 (file)
@@ -4315,6 +4315,10 @@ def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0,
                                fd_pipes=fd_pipes, returnpid=returnpid)
                        if retval:
                                return retval
+
+       if mydo == "configure" and mysettings["EAPI"] in ("0", "1", "2_pre1"):
+               return os.EX_OK
+
        kwargs = actionmap[mydo]["args"]
        mysettings["EBUILD_PHASE"] = mydo
        _doebuild_exit_status_unlink(
@@ -4660,6 +4664,8 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m
                if not eapi_is_supported(eapi):
                        # can't do anything with this.
                        raise portage.exception.UnsupportedAPIException(mycpv, eapi)
+               mysettings.pop("EAPI", None)
+               mysettings.configdict["pkg"]["EAPI"] = eapi
                try:
                        mysettings["PORTAGE_RESTRICT"] = " ".join(flatten(
                                portage.dep.use_reduce(portage.dep.paren_reduce(