summaryrefslogtreecommitdiffstats
path: root/crates/runner/src/paths.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/runner/src/paths.rs')
-rw-r--r--crates/runner/src/paths.rs18
1 files changed, 15 insertions, 3 deletions
diff --git a/crates/runner/src/paths.rs b/crates/runner/src/paths.rs
index 5e183cb..2e174df 100644
--- a/crates/runner/src/paths.rs
+++ b/crates/runner/src/paths.rs
@@ -28,14 +28,14 @@
//! └── tmp/ # temporary files (cleaned on start)
//!    ├── dev/ # container /dev
//!    ├── rootfs/ # unpacked rootfs.tar
+//!    ├── depends/ # unpacked dependencies
//!    └── task/
//!    └── <input hash>/
//! ├── build/ # mount point for /build directory
//! │ ├── downloads/ # downloaded sources
//! │ ├── task/ # internal runner files
//! │ └── work/ # build overlay mountpoint
-//! ├── rootfs/ # rootfs overlay mountpoint
-//! └── depends/ # overlayed on rootfs in container
+//! └── rootfs/ # rootfs overlay mountpoint
//! ```
use common::string_hash::*;
@@ -47,10 +47,10 @@ pub const DOWNLOADS_DIR: &str = "build/downloads";
pub const TMP_DIR: &str = "build/tmp";
pub const DEV_DIR: &str = "build/tmp/dev";
pub const ROOTFS_DIR: &str = "build/tmp/rootfs";
+pub const DEPENDS_TMP_DIR: &str = "build/tmp/depends";
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/build.lock";
pub const OUTPUT_STATE_DIR: &str = "build/state/output";
@@ -97,6 +97,18 @@ pub fn layer_dir(hash: &LayerHash) -> String {
join(&[LAYER_STATE_DIR, &hash.to_string()])
}
+pub fn depend_tmp_dir(hash: &ArchiveHash) -> String {
+ join(&[DEPENDS_TMP_DIR, &hash.to_string()])
+}
+
+pub fn depend_dir(hash: &ArchiveHash) -> String {
+ join(&[DEPENDS_TMP_DIR, &hash.to_string()])
+}
+
+pub fn depend_lock_filename(hash: &ArchiveHash) -> String {
+ join(&[DEPENDS_TMP_DIR, &format!("{}.lock", hash.to_string())])
+}
+
pub fn archive_tmp_filename(hash: &InputHash) -> String {
join(&[OUTPUT_STATE_DIR, &format!("{}.tar.tmp", hash)])
}