1 |
commit: 5bc6b9c8767c9a9bea511d7ece98f54e8a873b47 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 29 00:04:47 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 29 00:04:47 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5bc6b9c8 |
7 |
|
8 |
spawnebuild: skip previously executed phases |
9 |
|
10 |
This simply checks of $PORTAGE_BUILDDIR/.${EBUILD_PHASE%e}ed and skips |
11 |
the phase like ebuild.sh would. It preserves a special case for the |
12 |
install phase with FEATURES=noauto, so that dyn_install in ebuild.sh |
13 |
continues to work the same for this case.. Also, note that commit |
14 |
ae9b6cb513c7b29376caecf3b4e52aac452e2b93 preserves the automatic |
15 |
"recreating WORKDIR" behavior that used to be implemented in |
16 |
dyn_unpack. |
17 |
|
18 |
--- |
19 |
pym/portage/package/ebuild/doebuild.py | 11 +++++++++++ |
20 |
1 files changed, 11 insertions(+), 0 deletions(-) |
21 |
|
22 |
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py |
23 |
index a95a418..0e80917 100644 |
24 |
--- a/pym/portage/package/ebuild/doebuild.py |
25 |
+++ b/pym/portage/package/ebuild/doebuild.py |
26 |
@@ -1358,6 +1358,17 @@ def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0, |
27 |
if mydo == "pretend" and not eapi_has_pkg_pretend(eapi): |
28 |
return os.EX_OK |
29 |
|
30 |
+ if not (mydo == "install" and "noauto" in mysettings.features): |
31 |
+ check_file = os.path.join( |
32 |
+ mysettings["PORTAGE_BUILDDIR"], ".%sed" % mydo.rstrip('e')) |
33 |
+ if os.path.exists(check_file): |
34 |
+ writemsg_stdout(">>> It appears that " |
35 |
+ "'%s' has already executed for '%s'; skipping.\n" % |
36 |
+ (mydo, mysettings["PF"])) |
37 |
+ writemsg_stdout(">>> Remove '%s' to force %s.\n" % |
38 |
+ (check_file, mydo)) |
39 |
+ return os.EX_OK |
40 |
+ |
41 |
return _spawn_phase(mydo, mysettings, |
42 |
actionmap=actionmap, logfile=logfile, |
43 |
fd_pipes=fd_pipes, returnpid=returnpid) |