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 |
- |