This is needed since commit
7a6c34cc6bd6eb20a97e05347f87a0157f4ae58a in
order to ensure that the build dir is unlocked before exit listeners
are called. It fixes failures in catalyst stage 1 builds where two
instances of the same package, built sequentially for separate roots,
interfere with eachother's build dir lock.
self._build_dir.unlock()
def create_install_task(self):
- task = EbuildMerge(find_blockers=self.find_blockers,
+ task = EbuildMerge(exit_hook=self._install_exit,
+ find_blockers=self.find_blockers,
ldpath_mtimes=self.ldpath_mtimes, logger=self.logger,
pkg=self.pkg, pkg_count=self.pkg_count,
pkg_path=self._pkg_path, scheduler=self.scheduler,
settings=self.settings, tree=self._tree,
world_atom=self.world_atom)
- task.addExitListener(self._install_exit)
return task
def _install_exit(self, task):
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,
(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):
class EbuildMerge(CompositeTask):
- __slots__ = ("find_blockers", "logger", "ldpath_mtimes",
+ __slots__ = ("exit_hook", "find_blockers", "logger", "ldpath_mtimes",
"pkg", "pkg_count", "pkg_path", "pretend",
"settings", "tree", "world_atom")
def _merge_exit(self, merge_task):
if self._final_exit(merge_task) != os.EX_OK:
+ self.exit_hook(self)
self.wait()
return
logger.log(" ::: completed emerge (%s of %s) %s to %s" % \
(pkg_count.curval, pkg_count.maxval, pkg.cpv, pkg.root))
+ self.exit_hook(self)
self.wait()