From: Zac Medico Date: Mon, 31 Jan 2011 22:10:14 +0000 (-0800) Subject: EbuildBuild: spawn nofetch for fetchonly X-Git-Tag: v2.1.9.36~44 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8a395806cd6cac5038229ffc120f5fa7f0aad22e;p=portage.git EbuildBuild: spawn nofetch for fetchonly --- 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()