0034-patchlevel-34.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-034
  2. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  3. BASH PATCH REPORT
  4. =================
  5. Bash-Release: 4.3
  6. Patch-ID: bash43-034
  7. Bug-Reported-by: Dreamcat4 <dreamcat4@gmail.com>
  8. Bug-Reference-ID: <CAN39uTpAEs2GFu4ebC_SfSVMRTh-DJ9YanrY4BZZ3OO+CCHjng@mail.gmail.com>
  9. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-05/msg00001.html
  10. Bug-Description:
  11. If neither the -f nor -v options is supplied to unset, and a name argument is
  12. found to be a function and unset, subsequent name arguments are not treated as
  13. variables before attempting to unset a function by that name.
  14. Patch (apply with `patch -p0'):
  15. *** a/bash-4.3-patched/builtins/set.def 2013-04-19 07:20:34.000000000 -0400
  16. --- b/builtins/set.def 2015-05-05 13:25:36.000000000 -0400
  17. ***************
  18. *** 752,758 ****
  19. --- 797,805 ----
  20. {
  21. int unset_function, unset_variable, unset_array, opt, nameref, any_failed;
  22. + int global_unset_func, global_unset_var;
  23. char *name;
  24. unset_function = unset_variable = unset_array = nameref = any_failed = 0;
  25. + global_unset_func = global_unset_var = 0;
  26. reset_internal_getopt ();
  27. ***************
  28. *** 762,769 ****
  29. {
  30. case 'f':
  31. ! unset_function = 1;
  32. break;
  33. case 'v':
  34. ! unset_variable = 1;
  35. break;
  36. case 'n':
  37. --- 809,816 ----
  38. {
  39. case 'f':
  40. ! global_unset_func = 1;
  41. break;
  42. case 'v':
  43. ! global_unset_var = 1;
  44. break;
  45. case 'n':
  46. ***************
  47. *** 778,782 ****
  48. list = loptend;
  49. ! if (unset_function && unset_variable)
  50. {
  51. builtin_error (_("cannot simultaneously unset a function and a variable"));
  52. --- 825,829 ----
  53. list = loptend;
  54. ! if (global_unset_func && global_unset_var)
  55. {
  56. builtin_error (_("cannot simultaneously unset a function and a variable"));
  57. ***************
  58. *** 796,799 ****
  59. --- 843,849 ----
  60. name = list->word->word;
  61. + unset_function = global_unset_func;
  62. + unset_variable = global_unset_var;
  63. +
  64. #if defined (ARRAY_VARS)
  65. unset_array = 0;
  66. *** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500
  67. --- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400
  68. ***************
  69. *** 26,30 ****
  70. looks for to find the patch level (for the sccs version string). */
  71. ! #define PATCHLEVEL 33
  72. #endif /* _PATCHLEVEL_H_ */
  73. --- 26,30 ----
  74. looks for to find the patch level (for the sccs version string). */
  75. ! #define PATCHLEVEL 34
  76. #endif /* _PATCHLEVEL_H_ */