diff --git a/tools/build-lock.sh b/tools/build-lock.sh index e72948e00d..a06d541748 100755 --- a/tools/build-lock.sh +++ b/tools/build-lock.sh @@ -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"