-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 8/18/15 11:41 PM, Mike Frysinger wrote:
> just to double check, the warning from this code is expected ?
>
> $ bash-4.3 -c 'declare -a foo=(a b c); export foo; declare -p foo'
> declare -ax foo='([0]="a" [1]="b" [2]="c")'
> $ bash-4.4 -c "declare -a foo='(a b c)'"
> bash-4.4: warning: foo=(a b c): quoted compound array assignment deprecat
ed
Yes. It may not last into the final bash-4.4 release.
> we see this in Gentoo because we save/restore build envs via bash. so al
l
> builds done w/bash-4.3 and older use the quoted syntax, so updating with
> bash-4.4 in the system triggers these warnings. we can adjust our toolin
g
> to handle it, but would be nice if older bash didn't do it either. maybe
> send out a 4.3-p43 ? ;)
I'd rather people experiment with it first. It changes a bunch of test
output, so a patch would be pretty extensive. I've attached a patch for
you to try with Gentoo.
Chet
- --
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlXUhGQACgkQu1hp8GTqdKsJhwCfTKaj3GXe7U2RVtWrNdfwGZd5
cHoAn0SBXhfrI1npA/e+0Los5Eh5fO7p
=8f/u
-----END PGP SIGNATURE-----
*** ../bash-4.3.42/builtins/setattr.def 2014-01-09 11:34:35.000000000 -0500
--- builtins/setattr.def 2015-08-19 09:14:00.000000000 -0400
***************
*** 427,433 ****
#if defined (ARRAY_VARS)
if (array_p (var))
! print_array_assignment (var, 1);
else if (assoc_p (var))
! print_assoc_assignment (var, 1);
else
#endif
--- 427,433 ----
#if defined (ARRAY_VARS)
if (array_p (var))
! print_array_assignment (var, 0);
else if (assoc_p (var))
! print_assoc_assignment (var, 0);
else
#endif