1 |
Author: zmedico |
2 |
Date: 2008-06-29 09:38:16 +0000 (Sun, 29 Jun 2008) |
3 |
New Revision: 10848 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/__init__.py |
7 |
main/trunk/pym/portage/__init__.py |
8 |
Log: |
9 |
In EbuildBuild.execute(), call doebuild() separately for each phase since |
10 |
it will be easier to add asynchronous support to doebuild() if it's called |
11 |
this way. |
12 |
|
13 |
|
14 |
Modified: main/trunk/pym/_emerge/__init__.py |
15 |
=================================================================== |
16 |
--- main/trunk/pym/_emerge/__init__.py 2008-06-29 08:50:36 UTC (rev 10847) |
17 |
+++ main/trunk/pym/_emerge/__init__.py 2008-06-29 09:38:16 UTC (rev 10848) |
18 |
@@ -1529,6 +1529,8 @@ |
19 |
""" |
20 |
__slots__ = ("pkg", "settings") |
21 |
|
22 |
+ _phases = ("setup", "unpack", "compile", "test", "install") |
23 |
+ |
24 |
def _get_hash_key(self): |
25 |
hash_key = getattr(self, "_hash_key", None) |
26 |
if hash_key is None: |
27 |
@@ -1547,10 +1549,13 @@ |
28 |
if retval != os.EX_OK: |
29 |
return retval |
30 |
|
31 |
- retval = portage.doebuild(ebuild_path, "install", |
32 |
- root_config.root, self.settings, debug, |
33 |
- mydbapi=portdb, tree="porttree") |
34 |
- return retval |
35 |
+ for mydo in self._phases: |
36 |
+ retval = portage.doebuild(ebuild_path, mydo, |
37 |
+ root_config.root, self.settings, debug, |
38 |
+ mydbapi=portdb, tree="porttree") |
39 |
+ if retval != os.EX_OK: |
40 |
+ return retval |
41 |
+ return os.EX_OK |
42 |
|
43 |
class EbuildBinpkg(Task): |
44 |
""" |
45 |
|
46 |
Modified: main/trunk/pym/portage/__init__.py |
47 |
=================================================================== |
48 |
--- main/trunk/pym/portage/__init__.py 2008-06-29 08:50:36 UTC (rev 10847) |
49 |
+++ main/trunk/pym/portage/__init__.py 2008-06-29 09:38:16 UTC (rev 10848) |
50 |
@@ -4161,7 +4161,8 @@ |
51 |
|
52 |
# parse actionmap to spawn ebuild with the appropriate args |
53 |
def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None): |
54 |
- if alwaysdep or "noauto" not in mysettings.features: |
55 |
+ if "EMERGE_FROM" not in mysettings and \ |
56 |
+ (alwaysdep or "noauto" not in mysettings.features): |
57 |
# process dependency first |
58 |
if "dep" in actionmap[mydo]: |
59 |
retval=spawnebuild(actionmap[mydo]["dep"],actionmap,mysettings,debug,alwaysdep=alwaysdep,logfile=logfile) |
60 |
@@ -5298,7 +5299,8 @@ |
61 |
# unpack compile install`, we will try and fetch 4 times :/ |
62 |
need_distfiles = (mydo in ("fetch", "unpack") or \ |
63 |
mydo not in ("digest", "manifest") and "noauto" not in features) |
64 |
- if need_distfiles and not fetch( |
65 |
+ if not ("EMERGE_FROM" in mysettings and mydo != "unpack") and \ |
66 |
+ need_distfiles and not fetch( |
67 |
fetchme, mysettings, listonly=listonly, fetchonly=fetchonly): |
68 |
if have_build_dirs: |
69 |
# Create an elog message for this fetch failure since the |
70 |
@@ -5330,10 +5332,8 @@ |
71 |
return 1 |
72 |
|
73 |
# See above comment about fetching only when needed |
74 |
- if not digestcheck(checkme, mysettings, ("strict" in features), |
75 |
- (mydo not in ["digest","fetch","unpack"] and \ |
76 |
- mysettings.get("PORTAGE_CALLER", None) == "ebuild" and \ |
77 |
- "noauto" in features)): |
78 |
+ if not ("EMERGE_FROM" in mysettings and mydo != "unpack") and \ |
79 |
+ not digestcheck(checkme, mysettings, "strict" in features): |
80 |
return 1 |
81 |
|
82 |
if mydo == "fetch": |
83 |
|
84 |
-- |
85 |
gentoo-commits@l.g.o mailing list |