From owner-svn-src-projects@FreeBSD.ORG Wed Feb 11 17:41:25 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 095F4D82; Wed, 11 Feb 2015 17:41:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFC7AC7; Wed, 11 Feb 2015 17:41:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BHfOaX021821; Wed, 11 Feb 2015 17:41:24 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BHfOq9021820; Wed, 11 Feb 2015 17:41:24 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502111741.t1BHfOq9021820@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 11 Feb 2015 17:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r278588 - projects/release-install-debug/usr.sbin/bsdinstall/scripts X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 17:41:25 -0000 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