Branch oldpackages for 14.07
[14.07/packages.git] / utils / bash / patches / 110-upstream-bash42-010.patch
1                              BASH PATCH REPORT
2                              =================
3
4 Bash-Release:   4.2
5 Patch-ID:       bash42-010
6
7 Bug-Reported-by:        Mike Frysinger <vapier@gentoo.org>
8 Bug-Reference-ID:       <201104122356.20160.vapier@gentoo.org>
9 Bug-Reference-URL:      http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00058.html
10
11 Bug-Description:
12
13 Bash did not correctly print/reproduce here documents attached to commands
14 inside compound commands such as arithmetic for loops and user-specified
15 subshells.  This affected the execution of such commands inside a shell
16 function when the function definition is saved and later restored using
17 `.' or `eval'.
18
19 Patch (apply with `patch -p0'):
20
21 --- a/print_cmd.c
22 +++ b/print_cmd.c
23 @@ -315,6 +315,7 @@ make_command_string_internal (command)
24           cprintf ("( ");
25           skip_this_indent++;
26           make_command_string_internal (command->value.Subshell->command);
27 +         PRINT_DEFERRED_HEREDOCS ("");
28           cprintf (" )");
29           break;
30  
31 @@ -592,6 +593,7 @@ print_arith_for_command (arith_for_comma
32    newline ("do\n");
33    indentation += indentation_amount;
34    make_command_string_internal (arith_for_command->action);
35 +  PRINT_DEFERRED_HEREDOCS ("");
36    semicolon ();
37    indentation -= indentation_amount;
38    newline ("done");
39 @@ -653,6 +655,7 @@ print_group_command (group_command)
40      }
41  
42    make_command_string_internal (group_command->command);
43 +  PRINT_DEFERRED_HEREDOCS ("");
44  
45    if (inside_function_def)
46      {
47 --- a/patchlevel.h
48 +++ b/patchlevel.h
49 @@ -25,6 +25,6 @@
50     regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
51     looks for to find the patch level (for the sccs version string). */
52  
53 -#define PATCHLEVEL 9
54 +#define PATCHLEVEL 10
55  
56  #endif /* _PATCHLEVEL_H_ */