summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-26 22:21:51 +0000
committerMike Frysinger <vapier@gentoo.org>2009-02-26 22:21:51 +0000
commit924ba08905b765c1522505faa6dbb981637f0bab (patch)
treeb7cbae2e2b273da60d153fad4dd14cc544e6f5c6 /app-shells
parentAdding info regarding madwifi and wme_enabled (diff)
downloadhistorical-924ba08905b765c1522505faa6dbb981637f0bab.tar.gz
historical-924ba08905b765c1522505faa6dbb981637f0bab.tar.bz2
historical-924ba08905b765c1522505faa6dbb981637f0bab.zip
Add upstream patch for associative array issues.
Package-Manager: portage-2.2_rc23/cvs/Linux x86_64
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/bash/ChangeLog6
-rw-r--r--app-shells/bash/Manifest11
-rw-r--r--app-shells/bash/bash-4.0.ebuild3
-rw-r--r--app-shells/bash/files/bash-4.0-associative-array-subscripts.patch232
4 files changed, 245 insertions, 7 deletions
diff --git a/app-shells/bash/ChangeLog b/app-shells/bash/ChangeLog
index 244a41ef3d3b..2dc67133dd79 100644
--- a/app-shells/bash/ChangeLog
+++ b/app-shells/bash/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-shells/bash
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.206 2009/02/26 20:26:28 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.207 2009/02/26 22:21:51 vapier Exp $
+
+ 26 Feb 2009; Mike Frysinger <vapier@gentoo.org>
+ +files/bash-4.0-associative-array-subscripts.patch, bash-4.0.ebuild:
+ Add upstream patch for associative array issues.
26 Feb 2009; Mike Frysinger <vapier@gentoo.org>
files/bash-4.0-declare-identifier.patch:
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index 1e7a1e20a3b2..e2f42d7a9fe9 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -20,6 +20,7 @@ AUX bash-3.2-protos.patch 1106 RMD160 c54848169ebf937486c53af2e6f7e73a6c28285c S
AUX bash-3.2-redisplay-cursor.patch 685 RMD160 80fd6fc3eefb4cb589132f8b462b79c3e15d4b90 SHA1 7cb2664f7dd570f46f6302e743262e696f2555d9 SHA256 4bed8131f3ee39fccefc805dbe201eb9b8ce9671b9bc607c3d2a95ac6172d1ba
AUX bash-3.2-session-leader.patch 2098 RMD160 b298743fb54162d0caa8d409bf1f7b6f796c65f5 SHA1 ff136654614731ec3252ee5f34235138f0bf381e SHA256 533861310e7cba05f315ff56af32aaca5e4bdf7c2a450d4e616bb14fdf4a1f3d
AUX bash-3.2-ulimit.patch 449 RMD160 db5277031105cd4d2b7a6b92a8e74e532eb6f3db SHA1 cc634a2c188ac7661b9f4843f1b98f59d8f311a6 SHA256 d40709360f25ab355dc83e334b512d3dd80e435e241d1e69581fbc41504f8381
+AUX bash-4.0-associative-array-subscripts.patch 6078 RMD160 53190b1630bf39ef2638231f1f2fb4f55eb606e4 SHA1 f65ce1975e55419b6071abe0f0720fffd81c3e33 SHA256 ac44311956ae9aee9a221e52f105f3254f8bd3fd91f1404baa2e1dbf94443ca0
AUX bash-4.0-comsub-backslash-metacharacters.patch 750 RMD160 f297b78a482a8b3b481aa67889609d98826a4619 SHA1 eaf09f94c7745e43cdc64799ab858e9fb3a12e60 SHA256 7ab73ffde1b86d4286b180c6c968ce717908b404a46322c4d1cdb82c398eb03c
AUX bash-4.0-declare-identifier.patch 1144 RMD160 192eb95635a40d434a74cc97f2eb59e93bbacac5 SHA1 7ace6f35c12a453ae88d35b2308ef4e9e9cc868d SHA256 79a705ab4c658ca84bf4ee0eb80bef639d6137e9c271eac5cb9f124372ed4c11
AUX bash-4.0-exit-checkjobs.patch 549 RMD160 11158eb2bb4cb8fb0ac53db23b2d4d4cf54f6dc6 SHA1 ff51cc138c5c174829931641a61c2f86fa96d4aa SHA256 7732484a8a014c7fa23f4aa44aeb53671c1967bf373e132de8435d0fe538024a
@@ -107,13 +108,13 @@ EBUILD bash-3.1_p17.ebuild 4601 RMD160 7d674942ae8ebcb662faa45a9efacb236bd6202e
EBUILD bash-3.2_p39.ebuild 5950 RMD160 22536f34ab6d2eb7d2475c1e4e4cdaacc451df4b SHA1 4cfc39d407627fd7d6d446a0e9b3ed6ce35a2b5f SHA256 c9503776590b2b117773e4000d6aa6e0c73e2b0f32589dcfddab146109e9ea7c
EBUILD bash-3.2_p48-r1.ebuild 6124 RMD160 c3b16af5c8d019cb58c57a45ad5be2b9d93b4f2a SHA1 3e8e9ce6957f67abce65678f501883b4cf3b8ad4 SHA256 2895b32812a63c6208bb2a11ef60911751e09dbd42db39dae2d2acd90f9faba6
EBUILD bash-3.2_p48.ebuild 5961 RMD160 9ab905aeac020d82d8369a4853ac208afd4f7b17 SHA1 382b66ff687601decb3bbed25bf0465a2f7fbe93 SHA256 8794b417a6be993a370d2ca7a6bacfef66bb003e06ea410bdedf5b0a33666f65
-EBUILD bash-4.0.ebuild 5807 RMD160 fdd6d660576705362497029e22b1e689057aa8d4 SHA1 4f43fb78762044e18af95bd46754a46c5eec0962 SHA256 eb480383f8ce1470fcb2dec01b2bcdb1657ebeaf8c4c4e5f6278c9b185b5dba8
-MISC ChangeLog 33465 RMD160 9e5446eea78de97d31b62bebc027e4da2b77331f SHA1 495b67c5819ff2c8358be44989f8e7debbf3eb99 SHA256 9732c594263f60018cd0378cc1749e72a3ae9dd33fb7b60707206e718fa6d001
+EBUILD bash-4.0.ebuild 5870 RMD160 b3bb72d231612d951dabd8a2358f09c017289496 SHA1 5064e9cf3a3e215c6964cdac3b31626c71f16402 SHA256 8ae05302cc99a8bc72008c9433f0afd4ce893b6354500f70dd55c41898ae0473
+MISC ChangeLog 33638 RMD160 adf6cf2e5e8359a438da4c3e7732548aab9fb894 SHA1 3a04f3df445aa3c378b644f367178e83df9eebff SHA256 f493064f9e83e722c8532f1c05d117250d8e4fe6b9fe3bf8343f0d66c46e62b3
MISC metadata.xml 468 RMD160 9f720f1227381137311440f58d93250f29969786 SHA1 34bdfd1f0ed219ed79850647615a3b2603a4e079 SHA256 152d66c4d8f40627855ad3b4613e0ab88ff4bbf4333542eae52d411bdeb66e5f
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)
-iEYEARECAAYFAkmm+vkACgkQn/5bYzqsSmGroACeIT/rwoEFqLTFn5Ahi4///26T
-x44An24KwdZKaP2fvP2sWgKMjA3X9syG
-=zaeD
+iEYEARECAAYFAkmnFgUACgkQn/5bYzqsSmF/oQCfUmWJj/pUb6Xx+RPEpRwOMWWz
+HoQAmwZjllF3JRWBbuMPX3XvEaWrwIWn
+=31IZ
-----END PGP SIGNATURE-----
diff --git a/app-shells/bash/bash-4.0.ebuild b/app-shells/bash/bash-4.0.ebuild
index fc516276b0cf..bb8572fd8d18 100644
--- a/app-shells/bash/bash-4.0.ebuild
+++ b/app-shells/bash/bash-4.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.0.ebuild,v 1.10 2009/02/25 22:46:41 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.0.ebuild,v 1.11 2009/02/26 22:21:51 vapier Exp $
EAPI="1"
@@ -74,6 +74,7 @@ src_unpack() {
epatch "${FILESDIR}"/${P}-declare-identifier.patch
epatch "${FILESDIR}"/${P}-reset-parser-current-token.patch
epatch "${FILESDIR}"/${P}-pipeline-reserved-word.patch
+ epatch "${FILESDIR}"/${P}-associative-array-subscripts.patch
epatch "${FILESDIR}"/${PN}-4.0-negative-return.patch
# Log bash commands to syslog #91327
if use bashlogger ; then
diff --git a/app-shells/bash/files/bash-4.0-associative-array-subscripts.patch b/app-shells/bash/files/bash-4.0-associative-array-subscripts.patch
new file mode 100644
index 000000000000..6dfc7d1ad0fb
--- /dev/null
+++ b/app-shells/bash/files/bash-4.0-associative-array-subscripts.patch
@@ -0,0 +1,232 @@
+http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00188.html
+
+*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
+--- parse.y 2009-02-25 17:25:56.000000000 -0500
+***************
+*** 2916,2919 ****
+--- 2919,2923 ----
+ #define P_COMMAND 0x08 /* parsing a command, so look for comments */
+ #define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */
++ #define P_ARRAYSUB 0x20 /* parsing a [...] array subscript for assignment */
+
+ /* Lexical state while parsing a grouping construct or $(...). */
+***************
+*** 3130,3133 ****
+--- 3134,3139 ----
+ FREE (nestret);
+ }
++ else if ((flags & P_ARRAYSUB) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
++ goto parse_dollar_word;
+ }
+ /* Parse an old-style command substitution within double quotes as a
+***************
+*** 3146,3149 ****
+--- 3152,3156 ----
+ /* check for $(), $[], or ${} inside quoted string. */
+ {
++ parse_dollar_word:
+ if (open == ch) /* undo previous increment */
+ count--;
+***************
+*** 4249,4253 ****
+ (token_index == 0 && (parser_state&PST_COMPASSIGN))))
+ {
+! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+--- 4256,4260 ----
+ (token_index == 0 && (parser_state&PST_COMPASSIGN))))
+ {
+! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARRAYSUB);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+*** ../bash-4.0/arrayfunc.c 2009-01-04 14:32:21.000000000 -0500
+--- arrayfunc.c 2009-02-25 07:58:54.000000000 -0500
+***************
+*** 605,666 ****
+ }
+
+! /* This function assumes s[i] == '['; returns with s[ret] == ']' if
+! an array subscript is correctly parsed. */
+! int
+! skipsubscript (s, i)
+! const char *s;
+! int i;
+! {
+! int count, c;
+! #if defined (HANDLE_MULTIBYTE)
+! mbstate_t state, state_bak;
+! size_t slength, mblength;
+! #endif
+!
+! #if defined (HANDLE_MULTIBYTE)
+! memset (&state, '\0', sizeof (mbstate_t));
+! slength = strlen (s + i);
+! #endif
+!
+! count = 1;
+! while (count)
+! {
+! /* Advance one (possibly multibyte) character in S starting at I. */
+! #if defined (HANDLE_MULTIBYTE)
+! if (MB_CUR_MAX > 1)
+! {
+! state_bak = state;
+! mblength = mbrlen (s + i, slength, &state);
+!
+! if (MB_INVALIDCH (mblength))
+! {
+! state = state_bak;
+! i++;
+! slength--;
+! }
+! else if (MB_NULLWCH (mblength))
+! return i;
+! else
+! {
+! i += mblength;
+! slength -= mblength;
+! }
+! }
+! else
+! #endif
+! ++i;
+!
+! c = s[i];
+!
+! if (c == 0)
+! break;
+! else if (c == '[')
+! count++;
+! else if (c == ']')
+! count--;
+! }
+!
+! return i;
+! }
+
+ /* This function is called with SUB pointing to just after the beginning
+--- 605,609 ----
+ }
+
+! /* skipsubscript moved to subst.c to use private functions. 2009/02/24. */
+
+ /* This function is called with SUB pointing to just after the beginning
+*** ../bash-4.0/subst.c 2009-01-28 14:34:12.000000000 -0500
+--- subst.c 2009-02-25 09:18:33.000000000 -0500
+***************
+*** 223,226 ****
+--- 223,227 ----
+ static char *extract_delimited_string __P((char *, int *, char *, char *, char *, int));
+ static char *extract_dollar_brace_string __P((char *, int *, int, int));
++ static int skip_matched_pair __P((const char *, int, int, int, int));
+
+ static char *pos_params __P((char *, int, int, int));
+***************
+*** 1375,1378 ****
+--- 1376,1480 ----
+ #define CQ_RETURN(x) do { no_longjmp_on_fatal_error = 0; return (x); } while (0)
+
++ /* This function assumes s[i] == open; returns with s[ret] == close; used to
++ parse array subscripts. FLAGS currently unused. */
++ static int
++ skip_matched_pair (string, start, open, close, flags)
++ const char *string;
++ int start, open, close, flags;
++ {
++ int i, pass_next, backq, si, c, count;
++ size_t slen;
++ char *temp, *ss;
++ DECLARE_MBSTATE;
++
++ slen = strlen (string + start) + start;
++ no_longjmp_on_fatal_error = 1;
++
++ i = start + 1; /* skip over leading bracket */
++ count = 1;
++ pass_next = backq = 0;
++ ss = (char *)string;
++ while (c = string[i])
++ {
++ if (pass_next)
++ {
++ pass_next = 0;
++ if (c == 0)
++ CQ_RETURN(i);
++ ADVANCE_CHAR (string, slen, i);
++ continue;
++ }
++ else if (c == '\\')
++ {
++ pass_next = 1;
++ i++;
++ continue;
++ }
++ else if (backq)
++ {
++ if (c == '`')
++ backq = 0;
++ ADVANCE_CHAR (string, slen, i);
++ continue;
++ }
++ else if (c == '`')
++ {
++ backq = 1;
++ i++;
++ continue;
++ }
++ else if (c == open)
++ {
++ count++;
++ i++;
++ continue;
++ }
++ else if (c == close)
++ {
++ count--;
++ if (count == 0)
++ break;
++ i++;
++ continue;
++ }
++ else if (c == '\'' || c == '"')
++ {
++ i = (c == '\'') ? skip_single_quoted (ss, slen, ++i)
++ : skip_double_quoted (ss, slen, ++i);
++ /* no increment, the skip functions increment past the closing quote. */
++ }
++ else if (c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE))
++ {
++ si = i + 2;
++ if (string[si] == '\0')
++ CQ_RETURN(si);
++
++ if (string[i+1] == LPAREN)
++ temp = extract_delimited_string (ss, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND); /* ) */
++ else
++ temp = extract_dollar_brace_string (ss, &si, 0, SX_NOALLOC);
++ i = si;
++ if (string[i] == '\0') /* don't increment i past EOS in loop */
++ break;
++ i++;
++ continue;
++ }
++ else
++ ADVANCE_CHAR (string, slen, i);
++ }
++
++ CQ_RETURN(i);
++ }
++
++ #if defined (ARRAY_VARS)
++ int
++ skipsubscript (string, start)
++ const char *string;
++ int start;
++ {
++ return (skip_matched_pair (string, start, '[', ']', 0));
++ }
++ #endif
++
+ /* Skip characters in STRING until we find a character in DELIMS, and return
+ the index of that character. START is the index into string at which we