diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-06-29 09:38:16 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-06-29 09:38:16 +0000 |
commit | 0c277f2ca685f1058d4217b94ae9905b3098333e (patch) | |
tree | 398de8c69c5120f2e7b6a6c4d9acc0a959d35fff /pym/_emerge/__init__.py | |
parent | 8b9c5845a3cf4563456d09a520dad745ecc05211 (diff) | |
download | portage-0c277f2ca685f1058d4217b94ae9905b3098333e.tar.gz portage-0c277f2ca685f1058d4217b94ae9905b3098333e.tar.bz2 portage-0c277f2ca685f1058d4217b94ae9905b3098333e.zip |
In EbuildBuild.execute(), call doebuild() separately for each phase since
it will be easier to add asynchronous support to doebuild() if it's called
this way.
svn path=/main/trunk/; revision=10848
Diffstat (limited to 'pym/_emerge/__init__.py')
-rw-r--r-- | pym/_emerge/__init__.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 6bafb5276..dc266ddb0 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1529,6 +1529,8 @@ class EbuildBuild(Task): """ __slots__ = ("pkg", "settings") + _phases = ("setup", "unpack", "compile", "test", "install") + def _get_hash_key(self): hash_key = getattr(self, "_hash_key", None) if hash_key is None: @@ -1547,10 +1549,13 @@ class EbuildBuild(Task): if retval != os.EX_OK: return retval - retval = portage.doebuild(ebuild_path, "install", - root_config.root, self.settings, debug, - mydbapi=portdb, tree="porttree") - return retval + for mydo in self._phases: + retval = portage.doebuild(ebuild_path, mydo, + root_config.root, self.settings, debug, + mydbapi=portdb, tree="porttree") + if retval != os.EX_OK: + return retval + return os.EX_OK class EbuildBinpkg(Task): """ |