Date: Thu, 18 Apr 2019 00:38:54 +0000 (UTC) From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346340 - stable/11/release/tools Message-ID: <201904180038.x3I0csMH024199@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cperciva Date: Thu Apr 18 00:38:54 2019 New Revision: 346340 URL: https://svnweb.freebsd.org/changeset/base/346340 Log: Fix cross-building VMs with a non-/usr/src source directory. The path /usr/src was hard-coded here, resulting in mkimg not being able to find the bootfiles. Direct commit to stable/11 because the code in HEAD and stable/12 is completely different due to changes in OBJDIR layout. Modified: stable/11/release/tools/vmimage.subr Modified: stable/11/release/tools/vmimage.subr ============================================================================== --- stable/11/release/tools/vmimage.subr Wed Apr 17 23:32:38 2019 (r346339) +++ stable/11/release/tools/vmimage.subr Thu Apr 18 00:38:54 2019 (r346340) @@ -16,8 +16,9 @@ write_partition_layout() { _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" _OBJDIR="$(realpath ${_OBJDIR})" - if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then - BOOTFILES="/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/stand" + _WORLDDIR="$(realpath ${WORLDDIR})" + if [ -d "${_OBJDIR%%${_WORLDDIR}}/${TARGET}.${TARGET_ARCH}" ]; then + BOOTFILES="/${_OBJDIR%%${_WORLDDIR}}/${TARGET}.${TARGET_ARCH}${_WORLDDIR}/stand" else BOOTFILES="/${_OBJDIR}/stand" fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904180038.x3I0csMH024199>