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

Unified Diff: pym/_emerge/EbuildBuild.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 | « pym/_emerge/Binpkg.py ('k') | pym/_emerge/EbuildMerge.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pym/_emerge/EbuildBuild.py
diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py
index 98f5a2bf66105a5ccc59c3884682ccd7017a36eb..7144a0ae006c2007a391949434cbcb978ec91478 100644
--- a/pym/_emerge/EbuildBuild.py
+++ b/pym/_emerge/EbuildBuild.py
@@ -314,7 +314,7 @@ class EbuildBuild(CompositeTask):
self._unlock_builddir()
self.wait()
- def install(self):
+ def install(self, exit_handler):
"""
Install the package and then clean up and release locks.
Only call this after the build has completed successfully
@@ -343,10 +343,11 @@ class EbuildBuild(CompositeTask):
(pkg_count.curval, pkg_count.maxval, pkg.cpv)
logger.log(msg, short_msg=short_msg)
- try:
- rval = merge.execute()
- finally:
- self._unlock_builddir()
+ task = merge.create_task()
+ task.addExitListener(self._install_exit)
+ self._start_task(task, exit_handler)
- return rval
+ def _install_exit(self, task):
+ self._unlock_builddir()
+ self._default_final_exit(task)
« no previous file with comments | « pym/_emerge/Binpkg.py ('k') | pym/_emerge/EbuildMerge.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698