summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-06-09 15:25:10 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-06-09 15:26:36 +0200
commit41fbf73f7ab3fcd65e36c3d6678109f535d1aa03 (patch)
treebd34122f8243dcfbe3925661326bd9ab71e8dc8e
parentd6a62d748de71dd7ae0fad8da4289113616cfb99 (diff)
Revert "Fix: Make patch path absolute"
This fix was actually buggy. The problem here is that the `Package` struct is used to fill variables in the script. If we overwrite the patch pathes with their absolute variant, the script gets interpolated with the absolute paths, resulting in things like patch -p0 < /patches//home/user/package_repository/software/p.patch but the copy-to-container process copies (should copy) the patch file to /patches/software/p.patch This reverts commit dcc8b42810d34b2b906f0307c26c4826d16ad997. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r--src/repository/repository.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/repository/repository.rs b/src/repository/repository.rs
index f9651a7..170c2b0 100644
--- a/src/repository/repository.rs
+++ b/src/repository/repository.rs
@@ -150,9 +150,6 @@ impl Repository {
.map_ok(|patch| path_relative_to_root.join(patch))
.inspect(|patch| trace!("Patch relative to root: {:?}", patch.as_ref().map(|p| p.display())))
- .map_ok(|patch| root.join(patch))
- .inspect(|patch| trace!("Patch absolute: {:?}", patch.as_ref().map(|p| p.display())))
-
// if the patch file exists, use it (as config::Value).
//
// Otherwise we have an error here, because we're refering to a non-existing file.