FDS/OS 1.0 fixes
This commit is contained in:
@@ -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()?;
|
||||
|
||||
Reference in New Issue
Block a user