doebuild: disable noauto for binpkgs later
authorZac Medico <zmedico@gentoo.org>
Sat, 10 Dec 2011 17:40:19 +0000 (09:40 -0800)
committerZac Medico <zmedico@gentoo.org>
Sat, 10 Dec 2011 17:40:19 +0000 (09:40 -0800)
This is safer since doebuild_environment() can modify FEATURES if
setcpv isn't called before.

pym/portage/package/ebuild/doebuild.py

index 4955c662b152fc7285ba990c822bea2706059126..865ccd49dba4cb74060a7762f7562cb75e6b48f6 100644 (file)
@@ -560,10 +560,7 @@ def doebuild(myebuild, mydo, _unused=None, settings=None, debug=0, listonly=0,
                        os.path.dirname(os.path.dirname(pkgdir)))
        else:
                repo_config = None
-               # FEATURES=noauto only makes sense for porttree, and we don't want
-               # it to trigger redundant sourcing of the ebuild for api consumers
-               # that are using binary packages
-               mysettings.features.discard("noauto")
+
        mf = None
        if "strict" in features and \
                "digest" not in features and \
@@ -738,6 +735,13 @@ def doebuild(myebuild, mydo, _unused=None, settings=None, debug=0, listonly=0,
                        if rval != os.EX_OK:
                                return rval
 
+               else:
+                       # FEATURES=noauto only makes sense for porttree, and we don't want
+                       # it to trigger redundant sourcing of the ebuild for API consumers
+                       # that are using binary packages
+                       if "noauto" in mysettings.features:
+                               mysettings.features.discard("noauto")
+
                # The info phase is special because it uses mkdtemp so and
                # user (not necessarily in the portage group) can run it.
                if mydo not in ('info',) and \