Call load_infodir before the setup phase for binary packages so that USE is properly...
authorZac Medico <zmedico@gentoo.org>
Sun, 22 Oct 2006 03:29:44 +0000 (03:29 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 22 Oct 2006 03:29:44 +0000 (03:29 -0000)
svn path=/main/trunk/; revision=4789

pym/portage.py

index 86a998c64988a8ded0a59868f43a5eaa1fa43732..2882faacd2db580e6b9f2613be9ca6e67466a6b4 100644 (file)
@@ -2954,6 +2954,12 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                        return spawn(EBUILD_SH_BINARY + " " + mydo, mysettings,
                                debug=debug, free=1, logfile=logfile)
                elif mydo == "setup":
+                       infodir = os.path.join(
+                               mysettings["PORTAGE_BUILDDIR"], "build-info")
+                       if os.path.isdir(infodir):
+                               """Load USE flags for setup phase of a binary package.
+                               Ideally, the environment.bz2 would be used instead."""
+                               mysettings.load_infodir(infodir)
                        retval = spawn(EBUILD_SH_BINARY + " " + mydo, mysettings,
                                debug=debug, free=1, logfile=logfile)
                        if secpass >= 2: