From: Zac Medico Date: Fri, 4 Jul 2008 22:39:57 +0000 (-0000) Subject: Make EbuildBuild inherit from EbuildBuildDir since it's going to hold X-Git-Tag: v2.2_rc2~205 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=91f77fbc590d73ea150f6f8abb3d218f268bf721;p=portage.git Make EbuildBuild inherit from EbuildBuildDir since it's going to hold the build dir lock while it runs asynchronously. svn path=/main/trunk/; revision=10933 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 882b4af35..451e30d2e 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1698,7 +1698,7 @@ class EbuildBuildDir(SlotObject): class AlreadyLocked(portage.exception.PortageException): pass -class EbuildBuild(SlotObject): +class EbuildBuild(EbuildBuildDir): __slots__ = ("args_set", "find_blockers", "ldpath_mtimes", "logger", "opts", @@ -1758,9 +1758,8 @@ class EbuildBuild(SlotObject): phase="unpack", key=pkg.cpv) return retval - build_dir = EbuildBuildDir(pkg=pkg, settings=settings) try: - build_dir.lock() + self.lock() # Cleaning is triggered before the setup # phase, in portage.doebuild(). msg = " === (%s of %s) Cleaning (%s::%s)" % \ @@ -1831,9 +1830,9 @@ class EbuildBuild(SlotObject): if retval != os.EX_OK: return retval finally: - if build_dir.locked: + if self.locked: portage.elog.elog_process(pkg.cpv, settings) - build_dir.unlock() + self.unlock() return os.EX_OK class EbuildExecuter(SlotObject):