diff --git a/release/Makefile b/release/Makefile --- a/release/Makefile +++ b/release/Makefile @@ -190,9 +190,10 @@ done .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} pkg || true - ${PKG_INSTALL} wifi-firmware-kmod-release || true - ${PKG_CLEAN} || true +# Must cd to .TARGET to append to the correct METALOG + (cd ${.TARGET} && ${PKG_INSTALL} pkg || true) + (cd ${.TARGET} && ${PKG_INSTALL} wifi-firmware-kmod-release || true) + (cd ${.TARGET} && ${PKG_CLEAN} || true) .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf @@ -229,8 +230,9 @@ echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} pkg || true - ${PKG_CLEAN} || true +# Must cd to .TARGET to append to the correct METALOG + (cd ${.TARGET} && ${PKG_INSTALL} pkg || true) + (cd ${.TARGET} && ${PKG_CLEAN} || true) .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf @@ -265,9 +267,10 @@ done .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} pkg || true - ${PKG_INSTALL} wifi-firmware-kmod-release || true - ${PKG_CLEAN} || true +# Must cd to .TARGET to append to the correct METALOG + (cd ${.TARGET} && ${PKG_INSTALL} pkg || true) + (cd ${.TARGET} && ${PKG_INSTALL} wifi-firmware-kmod-release || true) + (cd ${.TARGET} && ${PKG_CLEAN} || true) .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf