diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-25 22:59:48 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-25 22:59:48 +0200 |
commit | ef2e197f1343d3c99b1896b7461e291baad8988e (patch) | |
tree | 4a633599f42a0c3594e99b9fbcd31e547100e5d0 /crates/runner/src/paths.rs | |
parent | e97a431920bdbe00a4ecef2c3b68639a68525bed (diff) | |
download | rebel-ef2e197f1343d3c99b1896b7461e291baad8988e.tar rebel-ef2e197f1343d3c99b1896b7461e291baad8988e.zip |
Add lockfile for build state directory
Use flock() to ensure that there are no concurrent instances using the
same build state. More fine-gained locking may be implemented in the
future.
Diffstat (limited to 'crates/runner/src/paths.rs')
-rw-r--r-- | crates/runner/src/paths.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/runner/src/paths.rs b/crates/runner/src/paths.rs index 632f030..9539782 100644 --- a/crates/runner/src/paths.rs +++ b/crates/runner/src/paths.rs @@ -8,6 +8,7 @@ //! ├── downloads/ //! │ └── ... //! ├── state/ +//! │ ├── build.lock //! │ ├── output/ //! │ │ ├── <input hash>.tar.tmp # during packing //! │ │ ├── <archive hash>.tar # files are renamed when packing is finished @@ -49,6 +50,7 @@ pub const TASK_TMP_DIR: &str = "build/tmp/task"; pub const TASK_TMP_ROOTFS_SUBDIR: &str = "rootfs"; pub const TASK_TMP_DEPENDS_SUBDIR: &str = "depends"; +pub const LOCKFILE: &str = "build/state/build.lock"; pub const OUTPUT_STATE_DIR: &str = "build/state/output"; pub const TASK_STATE_DIR: &str = "build/state/task"; pub const LAYER_STATE_DIR: &str = "build/state/layer"; |