summaryrefslogtreecommitdiff
path: root/mesonbuild/msetup.py
diff options
context:
space:
mode:
authorFlorian "sp1rit"​ <sp1rit@disroot.org>2024-11-01 12:37:29 +0100
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-06-03 15:43:58 +0300
commit4a14c4faf93361832ecb0134e1c0f58a239b4f15 (patch)
treee24df2730fea2c3d32d299bdccb3b8a6a6075975 /mesonbuild/msetup.py
parent960509811e3999f83c67607ce2a5a76e2a7bd36e (diff)
downloadmeson-4a14c4faf93361832ecb0134e1c0f58a239b4f15.tar.gz
utils: Replace BuildDirLock with generic DirectoryLock
DirectoryLock provides a generic locking implementation the replaces the previously used BuildDirLock.
Diffstat (limited to 'mesonbuild/msetup.py')
-rw-r--r--mesonbuild/msetup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py
index d4e745468..32344cae6 100644
--- a/mesonbuild/msetup.py
+++ b/mesonbuild/msetup.py
@@ -188,7 +188,9 @@ class MesonApp:
mlog.set_timestamp_start(time.monotonic())
if self.options.clearcache:
env.coredata.clear_cache()
- with mesonlib.BuildDirLock(self.build_dir):
+ with mesonlib.DirectoryLock(self.build_dir, 'meson-private/meson.lock',
+ mesonlib.DirectoryLockAction.FAIL,
+ 'Some other Meson process is already using this build directory. Exiting.'):
return self._generate(env, capture, vslite_ctx)
def check_unused_options(self, coredata: 'coredata.CoreData', cmd_line_options: T.Any, all_subprojects: T.Mapping[str, object]) -> None: