Activity log for bug #139097

Date Who What changed Old value New value Message
2007-09-12 12:31:43 Ian! D. Allen bug added bug
2007-09-12 12:40:54 Ian! D. Allen description Binary package hint: dash Linux home 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux Bug in variable expansion using an assignment in "local" in dash: $ x='1 2 3' $ y=$x # this works fine $ echo "$y" 1 2 3 $ local y=$x # this fails due to dash bug local: 2: bad variable name $ echo "$y" 1 The same use of assignment using "local" works fine in bash: bash-3.2$ x='1 2 3' bash-3.2$ y=$x bash-3.2$ echo "$y" 1 2 3 bash-3.2$ local y=$x bash: local: can only be used in a function bash-3.2$ foo () { > local y=$x > echo "$y" > } bash-3.2$ foo 1 2 3 <pre>Binary package hint: dash Linux home 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux Bug in variable expansion using an assignment in "local" in dash: $ x='1 2 3' $ y=$x # this works fine $ echo "$y" 1 2 3 $ local y=$x # this fails due to dash bug local: 2: bad variable name $ echo "$y" 1 The same use of assignment using "local" works fine in bash: bash-3.2$ x='1 2 3' bash-3.2$ y=$x bash-3.2$ echo "$y" 1 2 3 bash-3.2$ local y=$x bash: local: can only be used in a function bash-3.2$ foo () { > local y=$x > echo "$y" > } bash-3.2$ foo 1 2 3
2007-09-12 12:41:30 Ian! D. Allen description <pre>Binary package hint: dash Linux home 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux Bug in variable expansion using an assignment in "local" in dash: $ x='1 2 3' $ y=$x # this works fine $ echo "$y" 1 2 3 $ local y=$x # this fails due to dash bug local: 2: bad variable name $ echo "$y" 1 The same use of assignment using "local" works fine in bash: bash-3.2$ x='1 2 3' bash-3.2$ y=$x bash-3.2$ echo "$y" 1 2 3 bash-3.2$ local y=$x bash: local: can only be used in a function bash-3.2$ foo () { > local y=$x > echo "$y" > } bash-3.2$ foo 1 2 3 Binary package hint: dash Linux home 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux Bug in variable expansion using an assignment in "local" in dash: $ x='1 2 3' $ y=$x # this works fine $ echo "$y" 1 2 3 $ local y=$x # this fails due to dash bug local: 2: bad variable name $ echo "$y" 1 The same use of assignment using "local" works fine in bash: bash-3.2$ x='1 2 3' bash-3.2$ y=$x bash-3.2$ echo "$y" 1 2 3 bash-3.2$ local y=$x bash: local: can only be used in a function bash-3.2$ foo () { > local y=$x > echo "$y" > } bash-3.2$ foo 1 2 3
2008-02-06 20:01:26 Matthias Klose dash: importance Undecided Low
2008-02-06 20:01:26 Matthias Klose dash: status New Confirmed
2010-05-15 19:42:41 Ian! D. Allen summary dash 0.5.3-5ubuntu2 variable expansion error using local dash variable expansion error using local, readonly, and export
2010-05-15 19:47:45 Ian! D. Allen description Binary package hint: dash Linux home 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux Bug in variable expansion using an assignment in "local" in dash: $ x='1 2 3' $ y=$x # this works fine $ echo "$y" 1 2 3 $ local y=$x # this fails due to dash bug local: 2: bad variable name $ echo "$y" 1 The same use of assignment using "local" works fine in bash: bash-3.2$ x='1 2 3' bash-3.2$ y=$x bash-3.2$ echo "$y" 1 2 3 bash-3.2$ local y=$x bash: local: can only be used in a function bash-3.2$ foo () { > local y=$x > echo "$y" > } bash-3.2$ foo 1 2 3 <pre> Binary package hint: dash [Edited May 2010] True for all dash up to at least May 2010. Bug in variable expansion (incorrect word-splitting) using an assignment with "local", "readonly", or "export in dash: $ x='1 2 3' $ y=$x # this works fine $ echo "$y" 1 2 3 $ local y=$x # this fails due to dash bug local: 2: bad variable name $ echo "$y" 1 $ readonly y=$x # this fails due to dash bug readonly: 2: bad variable name $ export y=$x # this fails due to dash bug export: 2: bad variable name The same use of assignment using "local", "readonly" and "export" all work fine in bash: bash-3.2$ x='1 2 3' bash-3.2$ y=$x bash-3.2$ echo "$y" 1 2 3 bash-3.2$ local y=$x bash: local: can only be used in a function bash-3.2$ foo () { > local y=$x > echo "$y" > } bash-3.2$ foo 1 2 3 bash-3.2$ readonly y=$x # works fine bash-3.2$ export y=$x # works fine
2014-10-03 19:06:22 John Hupp bug added subscriber John Hupp