summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2021-10-09 22:03:08 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2021-10-09 22:03:08 +0200
commite3feae65c82f4a094b3e16b004587a960949e00b (patch)
tree4069d8fa392d9988cccdb463244914c72b9af269 /src
parentac670ae29e997fbc46cc773a6dd9f92ecc71c2fc (diff)
downloadrebel-e3feae65c82f4a094b3e16b004587a960949e00b.tar
rebel-e3feae65c82f4a094b3e16b004587a960949e00b.zip
paths: remove defintions for TASK_TMP_BUILDDIR and its subdirs
Diffstat (limited to 'src')
-rw-r--r--src/paths.rs5
-rw-r--r--src/runner/runc/run.rs6
-rw-r--r--src/runner/runc/spec.rs2
3 files changed, 4 insertions, 9 deletions
diff --git a/src/paths.rs b/src/paths.rs
index c4c792c..73cda77 100644
--- a/src/paths.rs
+++ b/src/paths.rs
@@ -47,11 +47,6 @@ pub const TMP_DIR: &str = "build/tmp";
pub const ROOTFS_DIR: &str = "build/tmp/rootfs";
pub const TASK_TMP_DIR: &str = "build/tmp/task";
-pub const TASK_TMP_BUILDDIR: &str = "build";
-pub const TASK_TMP_DESTDIR: &str = "build/dest";
-pub const TASK_TMP_DLDIR: &str = "build/downloads";
-pub const TASK_TMP_WORKDIR: &str = "build/work";
-
pub const TASK_TMP_ROOTFS_SUBDIR: &str = "rootfs";
pub const TASK_TMP_DEPENDS_SUBDIR: &str = "depends";
diff --git a/src/runner/runc/run.rs b/src/runner/runc/run.rs
index 4227540..d1cc116 100644
--- a/src/runner/runc/run.rs
+++ b/src/runner/runc/run.rs
@@ -29,7 +29,7 @@ fn init_task(task: &runner::Task) -> Result<Mount> {
fs::mkdir(&task_layer_dir)?;
let task_tmp_dir = paths::task_tmp_dir(&task.input_hash);
- let mount_target = paths::join(&[&task_tmp_dir, paths::TASK_TMP_WORKDIR]);
+ let mount_target = paths::join(&[&task_tmp_dir, paths::TASK_WORKDIR]);
fs::mkdir(&mount_target)?;
fs::mkdir(paths::join(&[
@@ -123,7 +123,7 @@ fn unpack_dependency<P1: AsRef<Path>, P2: AsRef<Path>>(filename: P1, dest: P2) -
fn unpack_dependencies(task: &runner::Task) -> Result<()> {
let task_tmp_dir = paths::task_tmp_dir(&task.input_hash);
- let downloads_dir = paths::join(&[&task_tmp_dir, paths::TASK_TMP_DLDIR]);
+ let downloads_dir = paths::join(&[&task_tmp_dir, paths::TASK_DLDIR]);
fs::mkdir(&downloads_dir)?;
@@ -150,7 +150,7 @@ fn unpack_dependencies(task: &runner::Task) -> Result<()> {
fn collect_output(task: &runner::Task, path: &str) -> Result<Option<ArchiveHash>> {
let source: PathBuf = [
&paths::task_tmp_dir(&task.input_hash),
- paths::TASK_TMP_DESTDIR,
+ paths::TASK_DESTDIR,
path,
]
.iter()
diff --git a/src/runner/runc/spec.rs b/src/runner/runc/spec.rs
index 067d94d..6acfa99 100644
--- a/src/runner/runc/spec.rs
+++ b/src/runner/runc/spec.rs
@@ -33,7 +33,7 @@ pub fn generate_spec(command: &str) -> runtime::Spec {
{
"destination": paths::abs(paths::TASK_BUILDDIR),
"type": "none",
- "source": paths::TASK_TMP_BUILDDIR,
+ "source": paths::TASK_BUILDDIR,
"options": [
"rbind"
]