The branch main has been updated by emaste:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=1b0b13915aaea80007e4ff86f2bb4f622e10d780

commit 1b0b13915aaea80007e4ff86f2bb4f622e10d780
Author:     Ed Maste <ema...@freebsd.org>
AuthorDate: 2025-06-19 16:00:30 +0000
Commit:     Ed Maste <ema...@freebsd.org>
CommitDate: 2025-06-24 19:13:39 +0000

    bsdinstall: Report error from installing firmware
    
    We should improve error reporting from commands invoked by binstall more
    generally, but this is a small improvement for an observed failure case.
    
    PR:             287654
    Reviewed by:    allanjude
    Event:          Kitchener-Waterloo Hackathon 202506
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D50941
---
 usr.sbin/bsdinstall/scripts/firmware | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/usr.sbin/bsdinstall/scripts/firmware 
b/usr.sbin/bsdinstall/scripts/firmware
index a563f0e578e4..0fc66f0a0261 100644
--- a/usr.sbin/bsdinstall/scripts/firmware
+++ b/usr.sbin/bsdinstall/scripts/firmware
@@ -115,11 +115,23 @@ f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf 
$BSDINSTALL_CHROOT/etc/
 ${DIALOG} --title "$DIALOG_TITLE" --backtitle "$DIALOG_BACKTITLE" \
        --infobox "Installing firmware. This may take a moment." 0 0
 
+pkg_install_fail=
 # Install each of the selected firmware packages
 for fw in ${selected}; do
        # We install one at a time in case one is not avail.
        # pkg-install.8 needs an option to skip unavail.
        ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install -qy ${fw}
+       if [ $? -ne 0 ]; then
+               pkg_install_fail="$pkg_install_fail $fw"
+       fi
 done
+if [ -n "$pkg_install_fail" ]; then
+       # Error(s) were likely spammed to the console; give the user a moment
+       # to read them.
+       sleep 5
+       bsddialog --backtitle "$OSNAME Installer" --title "Error" \
+           --msgbox "Error fetching firmware file(s)$pkg_install_fail" 0 0
+               exit 1
+fi
 
 # end

Reply via email to