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")
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 = []
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)
settings=self.settings)
phase.start()
retval = phase.wait()
- finally:
+ finally:
if builddir_lock is not None:
builddir_lock.unlock()