summaryrefslogtreecommitdiff
path: root/src/cli.rs
diff options
context:
space:
mode:
authorHermes Agent <hermes@localhost>2026-08-12 08:06:28 +0000
committerHermes Agent <hermes@localhost>2026-08-12 08:06:28 +0000
commitffa26f89481aa2d6259137b27cbe34f8e8330154 (patch)
tree044f67a77442df8137ad86b06d8e75e59b038347 /src/cli.rs
parentb9d43cb9d3dc4becec598ec83614c3561d7fc771 (diff)
Allow explicit APT configuration for builds
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/cli.rs b/src/cli.rs
index ffa9bba..2e204fa 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -30,6 +30,9 @@ pub enum Command {
spec: PathBuf,
#[arg(long)]
workspace: PathBuf,
+ /// Project-owned APT configuration. Defaults to apt.conf beside the specification.
+ #[arg(long)]
+ apt_config: Option<PathBuf>,
#[arg(long)]
output: PathBuf,
},
@@ -63,13 +66,15 @@ pub fn run(cli: Cli) -> Result<()> {
Command::Build {
spec,
workspace,
+ apt_config,
output,
} => {
let plan = BuildPlan::compile(ImageSpec::load(&spec)?)?;
- let apt_config = spec
- .parent()
- .unwrap_or_else(|| std::path::Path::new("."))
- .join("apt.conf");
+ let apt_config = apt_config.unwrap_or_else(|| {
+ spec.parent()
+ .unwrap_or_else(|| std::path::Path::new("."))
+ .join("apt.conf")
+ });
let installer = HasherInstaller::new(HasherProcessRunner);
let initramfs = MakeInitrdBuilder::new(InitramfsProcessRunner);
let mut executor = BuildExecutor::new(installer, initramfs);