Don't call prepare_build_dirs() inside doebuild() when called for parallel
authorZac Medico <zmedico@gentoo.org>
Thu, 27 Nov 2008 02:09:11 +0000 (02:09 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 27 Nov 2008 02:09:11 +0000 (02:09 -0000)
fetching. (trunk r12115)

svn path=/main/branches/2.1.6/; revision=12116

pym/portage/__init__.py

index 2db358580591dcdf6da0bbcb1b315a8fdbc8fd7d..862e50f1801ce8b26049c111508b43d93a4bdd1a 100644 (file)
@@ -5284,6 +5284,9 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                fetchall = 1
                mydo = "fetch"
 
+       parallel_fetchonly = mydo in ("fetch", "fetchall") and \
+               "PORTAGE_PARALLEL_FETCHONLY" in mysettings
+
        if mydo not in clean_phases and not os.path.exists(myebuild):
                writemsg("!!! doebuild: %s not found for %s\n" % (myebuild, mydo),
                        noiselevel=-1)
@@ -5517,7 +5520,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
 
                # Build directory creation isn't required for any of these.
                have_build_dirs = False
-               if not mydo in ("digest", "help", "manifest"):
+               if not parallel_fetchonly and mydo not in ("digest", "help", "manifest"):
                        mystatus = prepare_build_dirs(myroot, mysettings, cleanup)
                        if mystatus:
                                return mystatus