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:
Glen Barber 2018-01-23 16:41:31 +00:00
parent dfb1d80f64
commit afac3ed6c3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328283

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}"