feat: add metapackage build support and fail-fast custom scripts

- add BuildType::Meta handling in builder and interactive spec output
- allow metapackage specs without sources and expose is_metapackage()
- avoid build deps in install planning for metapackages
- run custom non-function build.sh scripts with `sh -e` to stop on first failure
- add regression test for custom script fail-fast behavior
- apply small cleanup refactors (let-chains/iterator simplifications)
This commit is contained in:
2026-02-25 16:49:36 -06:00
parent 9953d4b2ee
commit d9a30f5d56
13 changed files with 168 additions and 94 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ pub fn installed_scripts_dir(rootfs: &Path, pkg_name: &str) -> PathBuf {
/// Returns `true` if scripts were found and staged.
pub fn stage_scripts_from_spec_dir(spec: &PackageSpec, destdir: &Path) -> Result<bool> {
let source_dir = spec.spec_dir.join(STAGED_SCRIPTS_DIR);
let has_scripts_dir = if source_dir.exists() { true } else { false };
let has_scripts_dir = source_dir.exists();
if has_scripts_dir && !source_dir.is_dir() {
bail!(