FDS/OS 1.0 fixes

This commit is contained in:
2026-09-23 03:12:45 +08:00
parent 8a4788fca8
commit 6bfcce8070
23 changed files with 403 additions and 40 deletions
+12 -2
View File
@@ -13,8 +13,8 @@ use std::{
#[derive(clap::Args, Debug, Clone)]
pub struct BuildOptions {
/// Prepared Void source checkout used by xbps-src (not the workstation OS).
#[arg(long, global = true, default_value = "vendor/void-packages")]
/// Writable Void build checkout; keep it outside Git submodules.
#[arg(long, global = true, default_value = ".host/void-packages")]
pub void_packages: PathBuf,
/// Optional rootless XBPS wrapper, for example this checkout's tools/in-void.
#[arg(long, global = true)]
@@ -81,6 +81,16 @@ pub fn build(recipe: &Path, output: &Path, options: &BuildOptions) -> Result<Sof
"--void-packages must name a prepared Void source checkout".into(),
));
}
let superproject = Command::new("git")
.arg("-C")
.arg(&checkout)
.args(["rev-parse", "--show-superproject-working-tree"])
.output()?;
if !superproject.status.success() || !superproject.stdout.is_empty() {
return Err(Error(
"Use a writable Void build checkout outside Git submodules; FDS prepares .host/void-packages with make bootstrap".into(),
));
}
let destination = checkout.join("srcpkgs").join(&input.source.package);
if let Some(template) = input.source.template {
let source = parent(recipe)?.join(template).canonicalize()?;