Date: Wed, 11 Feb 2015 17:41:24 +0000 (UTC) From: Glen Barber <gjb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r278588 - projects/release-install-debug/usr.sbin/bsdinstall/scripts Message-ID: <201502111741.t1BHfOq9021820@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gjb Date: Wed Feb 11 17:41:23 2015 New Revision: 278588 URL: https://svnweb.freebsd.org/changeset/base/278588 Log: The bsdinstall(8) 'distfetch' command uses an all-or-nothing success/failure case, derived from DISTRIBUTIONS set in the environment. Since the debugging distribution sets will always be remote, and failure to fetch *-dbg.txz should not prevent the system from being installed, recommend deselecting the debugging sets when informing of fetch failures. In theory, 'bsdinstall distfetch' can iterate through the selected distributions to fetch them independently, but that would be a far too intrusive approach for now. Sponsored by: The FreeBSD Foundation Modified: projects/release-install-debug/usr.sbin/bsdinstall/scripts/auto Modified: projects/release-install-debug/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- projects/release-install-debug/usr.sbin/bsdinstall/scripts/auto Wed Feb 11 17:27:37 2015 (r278587) +++ projects/release-install-debug/usr.sbin/bsdinstall/scripts/auto Wed Feb 11 17:41:23 2015 (r278588) @@ -161,6 +161,7 @@ esac if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then ALL_DISTRIBUTIONS="$DISTRIBUTIONS" + WANT_DEBUG=false # Download to a directory in the new system as scratch space BSDINSTALL_FETCHDEST="$BSDINSTALL_CHROOT/usr/freebsd-dist" @@ -177,7 +178,39 @@ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then fi export FTP_PASSIVE_MODE=YES - bsdinstall distfetch || error "Failed to fetch remote distribution" + # Iterate through the distribution list and set a flag if debugging + # distributions have been selected. + for _DISTRIBUTION in $DISTRIBUTIONS; do + case $_DISTRIBUTION in + *-dbg.*) + WANT_DEBUG=true + DEBUG_LIST="\n$DEBUG_LIST\n$_DISTRIBUTION" + ;; + *) + ;; + esac + done + + # Fetch the distributions. + bsdinstall distfetch + rc=$? + + if [ $rc -ne 0 ]; then + # If unable to fetch the remote distributions, recommend + # deselecting the debugging distributions, and retrying the + # installation, since failure to fetch *-dbg.txz should not + # be considered a fatal installation error. + msg="Failed to fetch remote distribution" + if [ $WANT_DEBUG ]; then + # Trim leading and trailing newlines. + DEBUG_LIST="${DEBUG_LIST%%\n}" + DEBUG_LIST="${DEBUG_LIST##\n}" + msg="$msg\n\nPlease deselect the following distributions" + msg="$msg and retry the installation:" + msg="$msg\n$DEBUG_LIST" + fi + error "$msg" + fi export DISTRIBUTIONS="$ALL_DISTRIBUTIONS" fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502111741.t1BHfOq9021820>