Verify staged modules where they actually ship

The final check counted *.JASPModule files in the staged tree, but those are
deliberately not shipped: modules are installed into module_libs over the
deduplicated binary_pkgs store. The published 0.98.1 tarball has zero bundle
files, so a full CI build would have failed at its very last step. Check that
every module that built is present in module_libs instead.

Claude-Session: https://claude.ai/code/session_01GGe7kUhooMFuzY6GaDb2w9
This commit is contained in:
agw
2026-09-30 20:10:00 +02:00
parent 5601c0eb96
commit 35756d2afb
+13 -3
View File
@@ -519,10 +519,20 @@ staged_r="$STAGE_DIR$PREFIX/R/lib/R/lib"
for lib in libR.so libRblas.so libRlapack.so; do
[[ -f "$staged_r/$lib" ]] || { echo "error: staged tree lacks $lib" >&2; exit 1; }
done
staged_bundles="$(find "$STAGE_DIR$PREFIX/Modules" -maxdepth 1 -name '*.JASPModule' 2>/dev/null | wc -l)"
[[ "$staged_bundles" -gt 0 ]] || { echo "error: staged tree has no module bundles" >&2; exit 1; }
# Modules ship installed (module_libs/<module> over the binary_pkgs store), not
# as .JASPModule bundles, so check that every module that built got installed.
unstaged=()
for bundle in "$MODULE_BUNDLES"/*.JASPModule; do
module="$(basename "$bundle" .JASPModule)"
[[ -d "$STAGE_DIR$PREFIX/Modules/module_libs/$module" ]] || unstaged+=("$module")
done
if [[ ${#unstaged[@]} -gt 0 ]]; then
echo "error: built modules missing from the staged module_libs: ${unstaged[*]}" >&2
exit 1
fi
staged_modules="$(find "$STAGE_DIR$PREFIX/Modules/module_libs" -mindepth 1 -maxdepth 1 -type d | wc -l)"
staged_so="$(find "$STAGE_DIR$PREFIX" -name '*.so' 2>/dev/null | wc -l)"
log "staged: ${staged_bundles} module bundles, ${staged_so} shared objects"
log "staged: ${staged_modules} modules, ${staged_so} shared objects"
du -sh "$STAGE_DIR$PREFIX"/* 2>/dev/null | sort -rh | head -8
# ------------------------------------------------------------------- metadata