diff options
Diffstat (limited to 'portage_with_autodep/pym/_emerge/EbuildBuild.py')
-rw-r--r-- | portage_with_autodep/pym/_emerge/EbuildBuild.py | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/portage_with_autodep/pym/_emerge/EbuildBuild.py b/portage_with_autodep/pym/_emerge/EbuildBuild.py index 1c423a3..5a48f8e 100644 --- a/portage_with_autodep/pym/_emerge/EbuildBuild.py +++ b/portage_with_autodep/pym/_emerge/EbuildBuild.py @@ -1,4 +1,4 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from _emerge.EbuildExecuter import EbuildExecuter @@ -32,12 +32,13 @@ class EbuildBuild(CompositeTask): pkg = self.pkg settings = self.settings - rval = _check_temp_dir(settings) - if rval != os.EX_OK: - self.returncode = rval - self._current_task = None - self.wait() - return + if not self.opts.fetchonly: + rval = _check_temp_dir(settings) + if rval != os.EX_OK: + self.returncode = rval + self._current_task = None + self.wait() + return root_config = pkg.root_config tree = "porttree" @@ -108,6 +109,10 @@ class EbuildBuild(CompositeTask): def _prefetch_exit(self, prefetcher): + if self._was_cancelled(): + self.wait() + return + opts = self.opts pkg = self.pkg settings = self.settings @@ -225,9 +230,11 @@ class EbuildBuild(CompositeTask): #buildsyspkg: Check if we need to _force_ binary package creation self._issyspkg = "buildsyspkg" in features and \ system_set.findAtomForPackage(pkg) and \ - not opts.buildpkg + "buildpkg" not in features and \ + opts.buildpkg != 'n' - if opts.buildpkg or self._issyspkg: + if ("buildpkg" in features or self._issyspkg) \ + and not self.opts.buildpkg_exclude.findAtomForPackage(pkg): self._buildpkg = True @@ -406,7 +413,8 @@ class EbuildBuild(CompositeTask): ebuild_path = self._ebuild_path tree = self._tree - task = EbuildMerge(find_blockers=self.find_blockers, + task = EbuildMerge(exit_hook=self._install_exit, + find_blockers=self.find_blockers, ldpath_mtimes=ldpath_mtimes, logger=logger, pkg=pkg, pkg_count=pkg_count, pkg_path=ebuild_path, scheduler=self.scheduler, @@ -419,7 +427,6 @@ class EbuildBuild(CompositeTask): (pkg_count.curval, pkg_count.maxval, pkg.cpv) logger.log(msg, short_msg=short_msg) - task.addExitListener(self._install_exit) return task def _install_exit(self, task): |