summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 7effa53..9226622 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -37,6 +37,13 @@ pub struct Config {
pub makechrootpkg_bin: String,
/// Path to mkarchroot.
pub mkarchroot_bin: String,
+ /// Package list handed to `mkarchroot` after the working directory, i.e.
+ /// what goes into the warm root. The default is the real devtools usage
+ /// (`mkarchroot <dir> base`); there is no `-N` flag on the real tool, so
+ /// hardcoding one would make the first real-chroot run fail on its first
+ /// step. Kept configurable because a site may want a smaller seed.
+ #[serde(default = "default_mkarchroot_args")]
+ pub mkarchroot_args: Vec<String>,
/// Path to repo-add.
pub repo_add_bin: String,
/// Path to gpg.
@@ -94,6 +101,7 @@ impl Default for Config {
makepkg_bin: "makepkg".into(),
makechrootpkg_bin: "makechrootpkg".into(),
mkarchroot_bin: "mkarchroot".into(),
+ mkarchroot_args: default_mkarchroot_args(),
repo_add_bin: "repo-add".into(),
gpg_bin: "gpg".into(),
build_user: String::new(),
@@ -250,6 +258,10 @@ impl Config {
}
/// Filesystem-safe slug for a URL, used in cache filenames.
+fn default_mkarchroot_args() -> Vec<String> {
+ vec!["base".to_string()]
+}
+
pub fn slug(url: &str) -> String {
url.chars()
.map(|c| {