Date: Sun, 2 Jun 2013 23:20:46 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> 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 Message-ID: <201306022320.r52NKkJH095640@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306022320.r52NKkJH095640>