diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-01-31 14:10:14 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-02-02 15:25:04 -0800 |
commit | 8a395806cd6cac5038229ffc120f5fa7f0aad22e (patch) | |
tree | b4f5034c2997edd1035eb8ba803b8d5505345a4c | |
parent | Fix a typo in a comment. (diff) | |
download | portage-8a395806cd6cac5038229ffc120f5fa7f0aad22e.tar.gz portage-8a395806cd6cac5038229ffc120f5fa7f0aad22e.tar.bz2 portage-8a395806cd6cac5038229ffc120f5fa7f0aad22e.zip |
EbuildBuild: spawn nofetch for fetchonly
-rw-r--r-- | pym/_emerge/EbuildBuild.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py index 5645eade9..f7381ca5c 100644 --- a/pym/_emerge/EbuildBuild.py +++ b/pym/_emerge/EbuildBuild.py @@ -16,6 +16,7 @@ from portage import os from portage.output import colorize from portage.package.ebuild.digestcheck import digestcheck from portage.package.ebuild.doebuild import _check_temp_dir +from portage.package.ebuild._spawn_nofetch import spawn_nofetch class EbuildBuild(CompositeTask): @@ -118,6 +119,8 @@ class EbuildBuild(CompositeTask): settings=settings) retval = fetcher.execute() self.returncode = retval + self.wait() + return else: fetcher = EbuildFetcher( config_pool=self.config_pool, @@ -127,11 +130,8 @@ class EbuildBuild(CompositeTask): logfile=None, pkg=self.pkg, scheduler=self.scheduler) - fetcher.start() - self.returncode = fetcher.wait() - - self.wait() - return + self._start_task(fetcher, self._fetchonly_exit) + return self._build_dir = EbuildBuildDir( scheduler=self.scheduler, settings=settings) @@ -150,6 +150,13 @@ class EbuildBuild(CompositeTask): phase='clean', scheduler=self.scheduler, settings=self.settings) self._start_task(pre_clean_phase, self._pre_clean_exit) + def _fetchonly_exit(self, fetcher): + self._final_exit(fetcher) + if self.returncode != os.EX_OK: + portdb = self.pkg.root_config.trees[self._tree].dbapi + spawn_nofetch(portdb, self._ebuild_path, settings=self.settings) + self.wait() + def _pre_clean_exit(self, pre_clean_phase): if self._default_exit(pre_clean_phase) != os.EX_OK: self._unlock_builddir() |