~ubuntu-branches/ubuntu/lucid/bash/lucid

« back to all changes in this revision

Viewing changes to debian/patches/bash40-013.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-08-24 12:06:59 UTC
  • mfrom: (1.3.2 upstream) (2.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090824120659-gmp1uuy2w9k2st53
Tags: 4.0-4ubuntu1
* Merge with Debian; remaining changes:
  - Build from the upstream sources, build the documentation in info format.
  - /etc/skel/.bashrc: eval lesspipe.
* Changes to the skeleton .bashrc:
  - Source .bash_aliases after defining aliases. LP: #400686.
  - Enable color support for grep. LP: #386502.
* The bash docs now  describe uname -s not having any effect on many
  systems. LP: #378595.
* Don't ship an info dir file. LP: #358932.
* Fix some lintian warnings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh -e
 
2
 
 
3
if [ $# -eq 3 -a "$2" = '-d' ]; then
 
4
    pdir="-d $3"
 
5
elif [ $# -ne 1 ]; then
 
6
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
 
7
    exit 1
 
8
fi
 
9
case "$1" in
 
10
    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
 
11
    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
 
12
    *)
 
13
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
 
14
        exit 1
 
15
esac
 
16
exit 0
 
17
 
 
18
# DP: bash-4.0 upstream fix 013
 
19
 
 
20
                             BASH PATCH REPORT
 
21
                             =================
 
22
 
 
23
Bash-Release:   4.0
 
24
Patch-ID:       bash40-013
 
25
 
 
26
Bug-Reported-by:        jidanni@jidanni.org
 
27
Bug-Reference-ID:
 
28
Bug-Reference-URL:      http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=519165
 
29
 
 
30
Bug-Description:
 
31
 
 
32
Though references to $@ when there are no positional parameters will now
 
33
cause the shell to exit if the `errexit' option has been enabled, constructs
 
34
such as ${@:-foo} should not cause an exit.
 
35
 
 
36
Patch:
 
37
 
 
38
*** ../bash-4.0-patched/subst.c 2009-03-08 21:24:39.000000000 -0400
 
39
--- subst.c     2009-03-14 19:04:10.000000000 -0400
 
40
***************
 
41
*** 86,89 ****
 
42
--- 86,90 ----
 
43
  /* Flags for the `pflags' argument to param_expand() */
 
44
  #define PF_NOCOMSUB   0x01    /* Do not perform command substitution */
 
45
+ #define PF_IGNUNBOUND 0x02    /* ignore unbound vars even if -u set */
 
46
  
 
47
  /* These defs make it easier to use the editor. */
 
48
***************
 
49
*** 264,268 ****
 
50
  static int chk_arithsub __P((const char *, int));
 
51
  
 
52
! static WORD_DESC *parameter_brace_expand_word __P((char *, int, int));
 
53
  static WORD_DESC *parameter_brace_expand_indir __P((char *, int, int, int *, int *));
 
54
  static WORD_DESC *parameter_brace_expand_rhs __P((char *, char *, int, int, int *, int *));
 
55
--- 265,269 ----
 
56
  static int chk_arithsub __P((const char *, int));
 
57
  
 
58
! static WORD_DESC *parameter_brace_expand_word __P((char *, int, int, int));
 
59
  static WORD_DESC *parameter_brace_expand_indir __P((char *, int, int, int *, int *));
 
60
  static WORD_DESC *parameter_brace_expand_rhs __P((char *, char *, int, int, int *, int *));
 
61
***************
 
62
*** 5196,5202 ****
 
63
     NAME was found inside of a double-quoted expression. */
 
64
  static WORD_DESC *
 
65
! parameter_brace_expand_word (name, var_is_special, quoted)
 
66
       char *name;
 
67
!      int var_is_special, quoted;
 
68
  {
 
69
    WORD_DESC *ret;
 
70
--- 5197,5203 ----
 
71
     NAME was found inside of a double-quoted expression. */
 
72
  static WORD_DESC *
 
73
! parameter_brace_expand_word (name, var_is_special, quoted, pflags)
 
74
       char *name;
 
75
!      int var_is_special, quoted, pflags;
 
76
  {
 
77
    WORD_DESC *ret;
 
78
***************
 
79
*** 5230,5234 ****
 
80
  
 
81
        ret = param_expand (tt, &sindex, quoted, (int *)NULL, (int *)NULL,
 
82
!                         (int *)NULL, (int *)NULL, 0);
 
83
        free (tt);
 
84
      }
 
85
--- 5231,5235 ----
 
86
  
 
87
        ret = param_expand (tt, &sindex, quoted, (int *)NULL, (int *)NULL,
 
88
!                         (int *)NULL, (int *)NULL, pflags);
 
89
        free (tt);
 
90
      }
 
91
***************
 
92
*** 5291,5295 ****
 
93
    WORD_DESC *w;
 
94
  
 
95
!   w = parameter_brace_expand_word (name, var_is_special, quoted);
 
96
    t = w->word;
 
97
    /* Have to dequote here if necessary */
 
98
--- 5292,5296 ----
 
99
    WORD_DESC *w;
 
100
  
 
101
!   w = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND);
 
102
    t = w->word;
 
103
    /* Have to dequote here if necessary */
 
104
***************
 
105
*** 5308,5312 ****
 
106
      return (WORD_DESC *)NULL;
 
107
  
 
108
!   w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted);
 
109
    free (t);
 
110
  
 
111
--- 5309,5313 ----
 
112
      return (WORD_DESC *)NULL;
 
113
  
 
114
!   w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted, 0);
 
115
    free (t);
 
116
  
 
117
***************
 
118
*** 6659,6663 ****
 
119
      tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
 
120
    else
 
121
!     tdesc = parameter_brace_expand_word (name, var_is_special, quoted);
 
122
  
 
123
    if (tdesc)
 
124
--- 6660,6664 ----
 
125
      tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
 
126
    else
 
127
!     tdesc = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND);
 
128
  
 
129
    if (tdesc)
 
130
***************
 
131
*** 6990,6994 ****
 
132
        list = list_rest_of_args ();
 
133
  
 
134
!       if (list == 0 && unbound_vars_is_error)
 
135
        {
 
136
          uerror[0] = '$';
 
137
--- 6991,6995 ----
 
138
        list = list_rest_of_args ();
 
139
  
 
140
!       if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
 
141
        {
 
142
          uerror[0] = '$';
 
143
***************
 
144
*** 7052,7056 ****
 
145
        list = list_rest_of_args ();
 
146
  
 
147
!       if (list == 0 && unbound_vars_is_error)
 
148
        {
 
149
          uerror[0] = '$';
 
150
--- 7053,7057 ----
 
151
        list = list_rest_of_args ();
 
152
  
 
153
!       if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
 
154
        {
 
155
          uerror[0] = '$';
 
156
 
 
157
 
 
158
*** ../bash-4.0/patchlevel.h    2009-01-04 14:32:40.000000000 -0500
 
159
--- patchlevel.h        2009-02-22 16:11:31.000000000 -0500
 
160
***************
 
161
*** 26,30 ****
 
162
     looks for to find the patch level (for the sccs version string). */
 
163
  
 
164
! #define PATCHLEVEL 12
 
165
  
 
166
  #endif /* _PATCHLEVEL_H_ */
 
167
--- 26,30 ----
 
168
     looks for to find the patch level (for the sccs version string). */
 
169
  
 
170
! #define PATCHLEVEL 13
 
171
  
 
172
  #endif /* _PATCHLEVEL_H_ */