Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Unified Diff: pym/_emerge/Binpkg.py

Issue 6713043: Merge packages asynchronously in Portage. (Closed)
Patch Set: Don't set _task_queues.merge.max_jobs Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pym/_emerge/EbuildBuild.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pym/_emerge/Binpkg.py
diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py
index 00587451aeb9169d5320232b2a7dabb895408464..62d44c48f575c2f28c448a48973963565189d286 100644
--- a/pym/_emerge/Binpkg.py
+++ b/pym/_emerge/Binpkg.py
@@ -307,7 +307,7 @@ class Binpkg(CompositeTask):
portage.elog.elog_process(self.pkg.cpv, self.settings)
self._build_dir.unlock()
- def install(self):
+ def install(self, handler):
# This gives bashrc users an opportunity to do various things
# such as remove binary packages after they're installed.
@@ -320,19 +320,20 @@ class Binpkg(CompositeTask):
pkg=self.pkg, pkg_count=self.pkg_count,
pkg_path=self._pkg_path, scheduler=self.scheduler,
settings=settings, tree=self._tree, world_atom=self.world_atom)
+ task = merge.create_task()
+ task.addExitListener(self._install_exit)
+ self._start_task(task, handler)
- try:
- retval = merge.execute()
- finally:
- settings.pop("PORTAGE_BINPKG_FILE", None)
- self._unlock_builddir()
+ def _install_exit(self, task):
+ self.settings.pop("PORTAGE_BINPKG_FILE", None)
+ self._unlock_builddir()
- if retval == os.EX_OK and \
- 'binpkg-logs' not in self.settings.features and \
+ if self._default_final_exit(task) != os.EX_OK:
+ return
+
+ if 'binpkg-logs' not in self.settings.features and \
self.settings.get("PORTAGE_LOG_FILE"):
try:
os.unlink(self.settings["PORTAGE_LOG_FILE"])
except OSError:
pass
- return retval
-
« no previous file with comments | « no previous file | pym/_emerge/EbuildBuild.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698