build-lock: drop the make's MAKEFLAGS, a pkgsrc bmake below it dies on it

Debian's bmake exports .MAKE.LEVEL.ENV=MAKELEVEL, and the bmake that comes
with pkgsrc refuses to start with it ('Cannot delete ".MAKE.LEVEL.ENV" as
it is read-only').  Every bmake -V in a package directory came back empty, so
step 4 of a cross release took 0 archives from the shared DISTDIR and then
failed on all 26 it had to fetch.
This commit is contained in:
lotherk committed 2026-11-23 14:53:28 +00:00
1 parent 730d766943
commit 69b475c4ea
1 file changed
+8
+8
View File
@@ -117,4 +117,12 @@ trap 'cleanup; exit 130' INT TERM HUP
trap cleanup EXIT
BUILD_LOCK_HELD=$LOCK; export BUILD_LOCK_HELD
# The build make exports `.MAKE.LEVEL.ENV=MAKELEVEL' in MAKEFLAGS (Debian's
# bmake does; NetBSD's does not). A pkgsrc bmake started below this shell
# reads it and dies with `Cannot delete ".MAKE.LEVEL.ENV" as it is read-only',
# so every `bmake -V' that tools/makronix-distfiles.sh and tools/ext-dist.sh
# run in a package directory returned nothing -- step 4 of a release said
# "0 archives taken from" and then failed on every archive it had to fetch
# (measured 2026-11-23, the cross build on Linux).
unset MAKEFLAGS MAKELEVEL MFLAGS
sh -c "$1"