Make Binpkg inherit from EbuildBuildDir since it's going to hold
authorZac Medico <zmedico@gentoo.org>
Fri, 4 Jul 2008 22:49:04 +0000 (22:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 4 Jul 2008 22:49:04 +0000 (22:49 -0000)
the build dir lock while it runs asynchronously.

svn path=/main/trunk/; revision=10934

pym/_emerge/__init__.py

index 451e30d2e2327bc1939d781864b176ed345177ce..bfae9e20ab111589ef897091ad37f42b822e46d5 100644 (file)
@@ -2154,7 +2154,7 @@ class PackageUninstall(Task):
                        return e.status
                return os.EX_OK
 
-class Binpkg(SlotObject):
+class Binpkg(EbuildBuildDir):
 
        __slots__ = ("find_blockers",
                "ldpath_mtimes", "logger", "opts",
@@ -2247,7 +2247,7 @@ class Binpkg(SlotObject):
                }
 
                try:
-                       build_dir.lock()
+                       self.lock()
 
                        root_config = self.pkg.root_config
                        ebuild_path = os.path.join(infloc, pkg.pf + ".ebuild")
@@ -2347,7 +2347,7 @@ class Binpkg(SlotObject):
 
                finally:
                        settings.pop("PORTAGE_BINPKG_FILE", None)
-                       build_dir.unlock()
+                       self.unlock()
                return os.EX_OK
 
 class BinpkgFetcher(Task):