aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-08-28 17:04:47 -0700
committerZac Medico <zmedico@gentoo.org>2011-08-28 17:04:47 -0700
commit5bc6b9c8767c9a9bea511d7ece98f54e8a873b47 (patch)
treee3e812f1c23ea2474a0bd7d04cff5f737941645a /pym/portage/package
parentdoebuild: avoid redundant distfiles checks (diff)
downloadportage-5bc6b9c8767c9a9bea511d7ece98f54e8a873b47.tar.gz
portage-5bc6b9c8767c9a9bea511d7ece98f54e8a873b47.tar.bz2
portage-5bc6b9c8767c9a9bea511d7ece98f54e8a873b47.zip
spawnebuild: skip previously executed phases
This simply checks of $PORTAGE_BUILDDIR/.${EBUILD_PHASE%e}ed and skips the phase like ebuild.sh would. It preserves a special case for the install phase with FEATURES=noauto, so that dyn_install in ebuild.sh continues to work the same for this case.. Also, note that commit ae9b6cb513c7b29376caecf3b4e52aac452e2b93 preserves the automatic "recreating WORKDIR" behavior that used to be implemented in dyn_unpack.
Diffstat (limited to 'pym/portage/package')
-rw-r--r--pym/portage/package/ebuild/doebuild.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index a95a418b2..0e80917fe 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1358,6 +1358,17 @@ def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0,
if mydo == "pretend" and not eapi_has_pkg_pretend(eapi):
return os.EX_OK
+ if not (mydo == "install" and "noauto" in mysettings.features):
+ check_file = os.path.join(
+ mysettings["PORTAGE_BUILDDIR"], ".%sed" % mydo.rstrip('e'))
+ if os.path.exists(check_file):
+ writemsg_stdout(">>> It appears that "
+ "'%s' has already executed for '%s'; skipping.\n" %
+ (mydo, mysettings["PF"]))
+ writemsg_stdout(">>> Remove '%s' to force %s.\n" %
+ (check_file, mydo))
+ return os.EX_OK
+
return _spawn_phase(mydo, mysettings,
actionmap=actionmap, logfile=logfile,
fd_pipes=fd_pipes, returnpid=returnpid)