Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Apr 2014 06:56:59 +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: r264488 - head/usr.sbin/bsdinstall/scripts
Message-ID:  <201404150656.s3F6uxZ7081041@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Tue Apr 15 06:56:59 2014
New Revision: 264488
URL: http://svnweb.freebsd.org/changeset/base/264488

Log:
  When merging docsinstall and zfsboot updates to stable/9 it was discovered
  that the slightly older dialog(1) requires --separate-output when using the
  --checklist widget to force response to produce unquoted values (whereas in
  stable/10 --checklist widget without --separate-output will only quote the
  checklist labels in the response if the label is multi-word (contains any
  whitespace).
  
  Since these enhancements (see revisions 263956 and 264437) were developed
  originally on 10, the --separate-output option was omitted. When merged to
  stable/9, we (Allan Jude) and I found during testing that the "always-
  quoting" of the response was causing things like struct interpolation to
  fail (`f_struct device_$dev' would produce `f_struct device_\"da0\"' for
  example -- literal quotes inherited from dialog(1) --checklist response).
  
  To see the behavior, execute the following on stable/9 versus stable/10:
  
          dialog --checklist disks: 0 0 0 da0 "" off da1 "" off
  
  Check both items and hit enter. On stable/10, the response is:
  
          da0 da1
  
  On stable/9 the response is:
  
          "da0" "da1"
  
  If you use the --separate-output option, the response is the same for both:
  
          da0
          da1
  
  So applying --separate-output on every platform until either one of two
  things occurs 1) dialog(1,3) gets synchronized between stable/9, higher or
  2) we drop support for stable/9.
  
  MFC after:      3 days
  Reviewed by:    Allan Jude

Modified:
  head/usr.sbin/bsdinstall/scripts/docsinstall
  head/usr.sbin/bsdinstall/scripts/zfsboot

Modified: head/usr.sbin/bsdinstall/scripts/docsinstall
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/docsinstall	Tue Apr 15 02:32:00 2014	(r264487)
+++ head/usr.sbin/bsdinstall/scripts/docsinstall	Tue Apr 15 06:56:59 2014	(r264488)
@@ -119,6 +119,7 @@ dialog_menu_main()
 	selected=$( eval $DIALOG \
 		--title \"\$title\"             \
 		--backtitle \"\$btitle\"        \
+		--separate-output               \
 		--hline \"\$hline\"             \
 		--ok-label \"\$msg_ok\"         \
 		--cancel-label \"\$msg_cancel\" \

Modified: head/usr.sbin/bsdinstall/scripts/zfsboot
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/zfsboot	Tue Apr 15 02:32:00 2014	(r264487)
+++ head/usr.sbin/bsdinstall/scripts/zfsboot	Tue Apr 15 06:56:59 2014	(r264488)
@@ -581,6 +581,7 @@ dialog_menu_layout()
 			selections=$( eval $DIALOG \
 				--title \"\$DIALOG_TITLE\"         \
 				--backtitle \"\$DIALOG_BACKTITLE\" \
+				--separate-output                  \
 				--hline \"\$hline\"                \
 				--ok-label \"\$msg_ok\"            \
 				--cancel-label \"\$msg_back\"      \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404150656.s3F6uxZ7081041>