Date: Sun, 16 Nov 2025 02:04:34 GMT From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 6b15dc234dc5 - stable/15 - vmimage.subr: Log pkg/local.sqlite if pkgbase Message-ID: <202511160204.5AG24YCP061014@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=6b15dc234dc56cd65f07063c1f933c214c477120 commit 6b15dc234dc56cd65f07063c1f933c214c477120 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2025-11-15 21:29:25 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2025-11-16 02:04:15 +0000 vmimage.subr: Log pkg/local.sqlite if pkgbase We were doing this in vm_extra_install_packages but VM images without any extra packages installed would not get this installed. This results in a pkgbase system which thinks it doesn't have any packages installed (even though all the files are right there). Add a "metalog_add_data ./var/db/pkg/local.sqlite" call to the pkgbase install code path, and make the call from vm_extra_install_packages conditional on !PKGBASE. Reported by: Michael Dexter MFC after: immediately (needed for 15.0-RC1) (cherry picked from commit 10a4f2d016dccb5cfa03800bebc09a9b421c4df7) --- release/tools/vmimage.subr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 92f00f9cf7c3..482d279e5987 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -106,6 +106,7 @@ vm_install_base() { $pkg_cmd update selected=$(vm_base_packages_list | vm_extra_filter_base_packages) $pkg_cmd install -U -r FreeBSD-base $selected + metalog_add_data ./var/db/pkg/local.sqlite else cd ${WORLDDIR} && \ make DESTDIR=${DESTDIR} ${INSTALLOPTS} \ @@ -219,7 +220,9 @@ vm_extra_install_packages() { -o PKG_DBDIR=${DESTDIR}/var/db/pkg \ -r ${DESTDIR} \ autoremove - metalog_add_data ./var/db/pkg/local.sqlite + if [ -n "${NOPKGBASE}" ]; then + metalog_add_data ./var/db/pkg/local.sqlite + fi else if [ -n "${WITHOUT_QEMU}" ]; then return 0home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202511160204.5AG24YCP061014>
