From owner-svn-src-head@FreeBSD.ORG Sun Jun 2 23:20:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E3018A18; Sun, 2 Jun 2013 23:20:46 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D43041CBE; Sun, 2 Jun 2013 23:20:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r52NKkQo095641; Sun, 2 Jun 2013 23:20:46 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r52NKkJH095640; Sun, 2 Jun 2013 23:20:46 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201306022320.r52NKkJH095640@svn.freebsd.org> From: Devin Teske Date: Sun, 2 Jun 2013 23:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251276 - head/usr.sbin/bsdconfig/share/packages X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jun 2013 23:20:47 -0000 Author: dteske Date: Sun Jun 2 23:20:46 2013 New Revision: 251276 URL: http://svnweb.freebsd.org/changeset/base/251276 Log: Fix a bug in which the user's choice to Cancel was not recognized. This was caused by the standard (and correct) behavior of the shell to discard the return status of lvalue-operands in a pipe-chain. The solution is to not pipe the file-acquisition directly into sort(1) but instead store the output (allowing immediate testing of the return status) and later sort it. Modified: head/usr.sbin/bsdconfig/share/packages/index.subr Modified: head/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/index.subr Sun Jun 2 23:18:27 2013 (r251275) +++ head/usr.sbin/bsdconfig/share/packages/index.subr Sun Jun 2 23:20:46 2013 (r251276) @@ -70,13 +70,14 @@ f_index_initialize() f_show_info "$msg_attempting_to_fetch_file_from_selected_media" \ "$__path" - eval "$__var_to_set"='$( f_device_get media "$__path" | sort )' + eval "$__var_to_set"='$( f_device_get media "$__path" )' if [ $? -ne $SUCCESS ]; then f_show_msg "$msg_unable_to_get_file_from_selected_media" \ "$__path" f_device_shutdown media return $FAILURE fi + eval "$__var_to_set"='$( debug= f_getvar "$__var_to_set" | sort )' f_show_info "$msg_located_index_now_reading_package_data_from_it" if ! f_index_read "$__var_to_set"; then