diff options
Diffstat (limited to 'pym/portage/dbapi/vartree.py')
-rw-r--r-- | pym/portage/dbapi/vartree.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 976d8e372..982324c2c 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1684,19 +1684,17 @@ class dblink(object): self._prune_plib_registry(unmerge=True, needed=needed, preserve_paths=preserve_paths) - builddir_locked = "PORTAGE_BUILDIR_LOCKED" in self.settings builddir_lock = None scheduler = self._scheduler retval = os.EX_OK try: # Only create builddir_lock if the caller # has not already acquired the lock. - if not builddir_locked: + if "PORTAGE_BUILDIR_LOCKED" not in self.settings: builddir_lock = EbuildBuildDir( scheduler=scheduler, settings=self.settings) builddir_lock.lock() - builddir_locked = True prepare_build_dirs(settings=self.settings, cleanup=True) log_path = self.settings.get("PORTAGE_LOG_FILE") @@ -1746,8 +1744,7 @@ class dblink(object): finally: self.vartree.dbapi._bump_mtime(self.mycpv) - if builddir_locked: - try: + try: if not eapi_unsupported and os.path.isfile(myebuildpath): if retval != os.EX_OK: msg_lines = [] @@ -1789,7 +1786,7 @@ class dblink(object): self._elog_process(phasefilter=("prerm", "postrm")) - if retval == os.EX_OK and builddir_locked: + if retval == os.EX_OK: try: doebuild_environment(myebuildpath, "cleanrm", settings=self.settings, db=self.vartree.dbapi) @@ -1800,7 +1797,7 @@ class dblink(object): settings=self.settings) phase.start() retval = phase.wait() - finally: + finally: if builddir_lock is not None: builddir_lock.unlock() |