The branch main has been updated by emaste:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=9134ed157388f3e34374322a5de06449a031f1ec

commit 9134ed157388f3e34374322a5de06449a031f1ec
Author:     Ed Maste <ema...@freebsd.org>
AuthorDate: 2025-05-22 15:24:59 +0000
Commit:     Ed Maste <ema...@freebsd.org>
CommitDate: 2025-06-16 22:44:57 +0000

    bsdinstall: Default to pkgbase if media contains base packages
    
    As of commit 62d18f8c4c10 ("release: Add -DPKGBASE option to include
    pkgbase packages") we can include base system packages on the install
    media instead of dist tarballs.
    
    Set the default for the traditional/pkgbase question to match the
    artifact type included in the install image.
    
    Reviewed by:    jrm
    Event:          Kitchener-Waterloo Hackathon 202506
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D50467
---
 usr.sbin/bsdinstall/scripts/auto | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto
index d5ac14864d6b..ef92dc13a5b3 100755
--- a/usr.sbin/bsdinstall/scripts/auto
+++ b/usr.sbin/bsdinstall/scripts/auto
@@ -186,15 +186,24 @@ trap true SIGINT  # This section is optional
 trap error SIGINT      # Catch cntrl-C here
 if [ -z "$BSDINSTALL_SKIP_HOSTNAME" ]; then bsdinstall hostname || error "Set 
hostname failed"; fi
 
+if [ -f /usr/freebsd-packages/repos/FreeBSD-base-offline.conf ]; then
+       HAVE_BASE_PACKAGES=yes
+       PKGBASE_DEFAULT_BUTTON=--default-no
+else
+       unset HAVE_BASE_PACKAGES
+       unset PKGBASE_DEFAULT_BUTTON
+fi
+
 bsddialog --backtitle "$OSNAME Installer" --title "Select Installation Type" \
        --yes-label "Traditional" --no-label "Packages (Experimental)" --yesno \
+       $PKGBASE_DEFAULT_BUTTON \
        "Would you like to install the base system using traditional 
distribution sets or packages (experimental)?" 0 0
 if [ $? -eq 1 ]; then
        PKGBASE=yes
 fi
 
 if [ "$PKGBASE" == yes ]; then
-       if [ -f /usr/freebsd-packages/repos/FreeBSD-base-offline.conf ]; then
+       if [ "$HAVE_BASE_PACKAGES" == yes ]; then
                bsddialog --backtitle "$OSNAME Installer" --title "Network or 
Offline Installation" \
                    --yes-label "Network" --no-label "Offline (Limited 
Packages)" --yesno \
                    "Would you like to fetch packages from the internet or use 
the limited set of packages included in this installation media?" 0 0

Reply via email to