diff --git a/tools/srctree-stage.sh b/tools/srctree-stage.sh index c8f3a3dab1..05caa4dc37 100755 --- a/tools/srctree-stage.sh +++ b/tools/srctree-stage.sh @@ -94,9 +94,18 @@ done (cd "$TOP" && "$PAX" -rw -pm "$DIR") < "$rootlist" \ || die "copying the repository into $DIR failed" -# Each submodule: its tracked files, no .git, no build output. +# Each submodule: its tracked files, no .git, no build output. A submodule +# that is not checked out is left out of the set: the ones the build needs are +# the forks of ext/ (ext/AGENTS.md) and pkgsrc, and the rest (krang, sshcrypt, +# kidstube, CNCL, mikronix) carry no file the release reads. A fresh clone +# that did not run `git submodule update --init' for them must not stop the +# release in this step (measured 2026-11-23: `git submodule update --recursive' +# on the MacBook aborted on ext/src/mikronix, whose remote wants a password). for sub in $SUBMODULES; do - [ -d "$TOP/$sub" ] || die "submodule $sub is not checked out" + if [ ! -d "$TOP/$sub" ] || [ -z "$(ls -A "$TOP/$sub" 2>/dev/null)" ]; then + echo "srctree-stage: $sub is not checked out, not in the source set" >&2 + continue + fi mkdir -p "$DIR/$sub" (cd "$TOP/$sub" && git ls-files) | (cd "$TOP/$sub" && "$PAX" -rw -pm "$DIR/$sub") \