svn commit: r278588 - projects/release-install-debug/usr.sbin/bsdinstall/scripts
Glen Barber
gjb at FreeBSD.org
Wed Feb 11 17:41:25 UTC 2015
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
More information about the svn-src-projects
mailing list