When CHROOTBUILD_SKIP is set, evaluate the existence of /bin/sh

within the CHROOTDIR.  If it does not exist, unset CHROOTBUILD_SKIP
to prevent build failures.

Requested by:	swills
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
gjb 2018-01-23 16:41:31 +00:00
parent c9cf794454
commit 5fc81d4e46

View File

@ -203,6 +203,11 @@ env_check() {
exit 1
fi
# Unset CHROOTBUILD_SKIP if the chroot(8) does not appear to exist.
if [ ! -z "${CHROOTBUILD_SKIP}" -a ! -e ${CHROOTDIR}/bin/sh ]; then
CHROOTBUILD_SKIP=
fi
CHROOT_MAKEENV="${CHROOT_MAKEENV} \
MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}"