git: 4b8d1073f64a - stable/15 - vmimage.subr: skip -dbg sets for WITHOUT_DEBUG_FILES/WITHOUT_KERNEL_SYMBOLS

From: Navdeep Parhar <np_at_FreeBSD.org>
Date: Sun, 08 Mar 2026 06:20:45 UTC
The branch stable/15 has been updated by np:

URL: https://cgit.FreeBSD.org/src/commit/?id=4b8d1073f64a822d3c32316761341d28e1f014c7

commit 4b8d1073f64a822d3c32316761341d28e1f014c7
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2026-02-27 02:04:16 +0000
Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2026-03-08 01:49:46 +0000

    vmimage.subr: skip -dbg sets for WITHOUT_DEBUG_FILES/WITHOUT_KERNEL_SYMBOLS
    
    This matches non-pkgbase behavior as installworld/installkernel skip the
    debug bits if these knobs are set.
    
    Sponsored by:   Chelsio Communications
    Reviewed by:    cperciva
    Differential Revision:  https://reviews.freebsd.org/D55572
    
    (cherry picked from commit 960409d660486c823615dc4cb2ff91793337ef20)
---
 release/tools/vmimage.subr | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index f7fc9906c049..38c1540484cd 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -74,14 +74,14 @@ vm_base_packages_list() {
 	# Output a list of package sets equivalent to what we get from
 	# "installworld installkernel distribution", aka. the full base
 	# system.
-	for S in base kernels; do
-		echo FreeBSD-set-$S
-		echo FreeBSD-set-$S-dbg
-	done
+	echo FreeBSD-set-base
+	[ -z "${WITHOUT_DEBUG_FILES}" ] && echo FreeBSD-set-base-dbg
+	echo FreeBSD-set-kernels
+	[ -z "${WITHOUT_KERNEL_SYMBOLS}" ] && echo FreeBSD-set-kernels-dbg
 	case ${TARGET_ARCH} in
 	amd64 | aarch64 | powerpc64)
 		echo FreeBSD-set-lib32
-		echo FreeBSD-set-lib32-dbg
+		[ -z "${WITHOUT_DEBUG_FILES}" ] && echo FreeBSD-set-lib32-dbg
 	esac
 	echo FreeBSD-set-tests
 	# Also install pkg, since systems with a packaged base system should