Roman Rakus 23098d
			     BASH PATCH REPORT
Roman Rakus 23098d
			     =================
Roman Rakus 23098d
Roman Rakus 23098d
Bash-Release:	4.2
Roman Rakus 23098d
Patch-ID:	bash42-010
Roman Rakus 23098d
Roman Rakus 23098d
Bug-Reported-by:	Mike Frysinger <vapier@gentoo.org>
Roman Rakus 23098d
Bug-Reference-ID:	<201104122356.20160.vapier@gentoo.org>
Roman Rakus 23098d
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00058.html
Roman Rakus 23098d
Roman Rakus 23098d
Bug-Description:
Roman Rakus 23098d
Roman Rakus 23098d
Bash did not correctly print/reproduce here documents attached to commands
Roman Rakus 23098d
inside compound commands such as arithmetic for loops and user-specified
Roman Rakus 23098d
subshells.  This affected the execution of such commands inside a shell
Roman Rakus 23098d
function when the function definition is saved and later restored using
Roman Rakus 23098d
`.' or `eval'.
Roman Rakus 23098d
Roman Rakus 23098d
Patch (apply with `patch -p0'):
Roman Rakus 23098d
Roman Rakus 23098d
*** ../bash-4.2-patched/print_cmd.c	2010-05-30 18:34:08.000000000 -0400
Roman Rakus 23098d
--- print_cmd.c	2011-04-14 10:43:18.000000000 -0400
Roman Rakus 23098d
***************
Roman Rakus 23098d
*** 316,319 ****
Roman Rakus 23098d
--- 317,321 ----
Roman Rakus 23098d
  	  skip_this_indent++;
Roman Rakus 23098d
  	  make_command_string_internal (command->value.Subshell->command);
Roman Rakus 23098d
+ 	  PRINT_DEFERRED_HEREDOCS ("");
Roman Rakus 23098d
  	  cprintf (" )");
Roman Rakus 23098d
  	  break;
Roman Rakus 23098d
***************
Roman Rakus 23098d
*** 593,596 ****
Roman Rakus 23098d
--- 606,610 ----
Roman Rakus 23098d
    indentation += indentation_amount;
Roman Rakus 23098d
    make_command_string_internal (arith_for_command->action);
Roman Rakus 23098d
+   PRINT_DEFERRED_HEREDOCS ("");
Roman Rakus 23098d
    semicolon ();
Roman Rakus 23098d
    indentation -= indentation_amount;
Roman Rakus 23098d
***************
Roman Rakus 23098d
*** 654,657 ****
Roman Rakus 23098d
--- 668,672 ----
Roman Rakus 23098d
  
Roman Rakus 23098d
    make_command_string_internal (group_command->command);
Roman Rakus 23098d
+   PRINT_DEFERRED_HEREDOCS ("");
Roman Rakus 23098d
  
Roman Rakus 23098d
    if (inside_function_def)
Roman Rakus 23098d
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
Roman Rakus 23098d
--- patchlevel.h	Thu Feb 24 21:41:34 2011
Roman Rakus 23098d
***************
Roman Rakus 23098d
*** 26,30 ****
Roman Rakus 23098d
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 23098d
  
Roman Rakus 23098d
! #define PATCHLEVEL 9
Roman Rakus 23098d
  
Roman Rakus 23098d
  #endif /* _PATCHLEVEL_H_ */
Roman Rakus 23098d
--- 26,30 ----
Roman Rakus 23098d
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 23098d
  
Roman Rakus 23098d
! #define PATCHLEVEL 10
Roman Rakus 23098d
  
Roman Rakus 23098d
  #endif /* _PATCHLEVEL_H_ */