doebuild: check distfiles digests less often
authorZac Medico <zmedico@gentoo.org>
Tue, 30 Aug 2011 17:03:05 +0000 (10:03 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 30 Aug 2011 17:03:05 +0000 (10:03 -0700)
If the unpack phase is not going to be executed as a dependency, then
we can simply skip the distfiles digest checks if the unpack phase is
already marked complete via $PORTAGE_BUILDDIR/.unpacked.

pym/portage/package/ebuild/doebuild.py

index 92d73e5ec8d64d8b880e4ee2436750ed52d5aa94..2ab6796066d96f5ca766763813ef2d65c7fd47ef 100644 (file)
@@ -684,7 +684,10 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                alist = set(mysettings.configdict["pkg"].get("A", "").split())
 
                unpacked = False
-               if "unpack" in phases_to_run:
+               if "unpack" not in phases_to_run:
+                       unpacked = os.path.exists(os.path.join(
+                               mysettings["PORTAGE_BUILDDIR"], ".unpacked"))
+               else:
                        try:
                                workdir_st = os.stat(mysettings["WORKDIR"])
                        except OSError: