vmimage.subr: Support NO_ROOT pkgbase

We need to tell pkg to record files in METALOG; otherwise when we
create the VM image it's almost empty.

MFC after:	6 hours
Sponsored by:	https://www.patreon.com/cperciva
This commit is contained in:
Colin Percival committed 2025-10-03 00:25:05 -07:00
1 parent f32ffd11b5
commit 08b497dc6c
1 file changed
+3
+3
View File
@@ -95,6 +95,9 @@ vm_install_base() {
pkg_cmd="pkg --rootdir ${DESTDIR} --repo-conf-dir ${PKGBASE_REPO_DIR}
-o ASSUME_ALWAYS_YES=yes -o IGNORE_OSVERSION=yes
-o ABI=${PKG_ABI} -o INSTALL_AS_USER=yes "
if -n "${NO_ROOT}" ]; then
pkg_cmd="$pkg_cmd -o METALOG=METALOG"
fi
$pkg_cmd update
selected=$($pkg_cmd rquery -U -r FreeBSD-base %n | \
vm_filter_base_packages | vm_extra_filter_base_packages)