Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13423 - main/branches/2.1.6/bin/ebuild-helpers
Date: Thu, 30 Apr 2009 06:45:54
Message-Id: E1LzQ1o-0003u2-5a@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-04-30 06:45:51 +0000 (Thu, 30 Apr 2009)
3 New Revision: 13423
4
5 Modified:
6 main/branches/2.1.6/bin/ebuild-helpers/dobin
7 main/branches/2.1.6/bin/ebuild-helpers/dodoc
8 main/branches/2.1.6/bin/ebuild-helpers/doexe
9 main/branches/2.1.6/bin/ebuild-helpers/doins
10 main/branches/2.1.6/bin/ebuild-helpers/dolib
11 main/branches/2.1.6/bin/ebuild-helpers/doman
12 main/branches/2.1.6/bin/ebuild-helpers/domo
13 main/branches/2.1.6/bin/ebuild-helpers/dosbin
14 main/branches/2.1.6/bin/ebuild-helpers/dosed
15 main/branches/2.1.6/bin/ebuild-helpers/ecompress
16 main/branches/2.1.6/bin/ebuild-helpers/ecompressdir
17 main/branches/2.1.6/bin/ebuild-helpers/prepallman
18 Log:
19 In order to eliminate the possibility of integer overflay, replace things like
20 ((ret+=$?)) with ((ret|=$?)). Thanks to zong_sharo for the suggestion.
21 (trunk r13242)
22
23 Modified: main/branches/2.1.6/bin/ebuild-helpers/dobin
24 ===================================================================
25 --- main/branches/2.1.6/bin/ebuild-helpers/dobin 2009-04-30 06:45:37 UTC (rev 13422)
26 +++ main/branches/2.1.6/bin/ebuild-helpers/dobin 2009-04-30 06:45:51 UTC (rev 13423)
27 @@ -23,7 +23,7 @@
28 echo "!!! ${0##*/}: $x does not exist" 1>&2
29 false
30 fi
31 - ((ret+=$?))
32 + ((ret|=$?))
33 done
34
35 exit ${ret}
36
37 Modified: main/branches/2.1.6/bin/ebuild-helpers/dodoc
38 ===================================================================
39 --- main/branches/2.1.6/bin/ebuild-helpers/dodoc 2009-04-30 06:45:37 UTC (rev 13422)
40 +++ main/branches/2.1.6/bin/ebuild-helpers/dodoc 2009-04-30 06:45:51 UTC (rev 13423)
41 @@ -21,7 +21,7 @@
42 ecompress --queue "${dir}/${x##*/}"
43 elif [ ! -e "${x}" ] ; then
44 echo "!!! ${0##*/}: $x does not exist" 1>&2
45 - ((++ret))
46 + ((ret|=1))
47 fi
48 done
49
50
51 Modified: main/branches/2.1.6/bin/ebuild-helpers/doexe
52 ===================================================================
53 --- main/branches/2.1.6/bin/ebuild-helpers/doexe 2009-04-30 06:45:37 UTC (rev 13422)
54 +++ main/branches/2.1.6/bin/ebuild-helpers/doexe 2009-04-30 06:45:51 UTC (rev 13423)
55 @@ -35,7 +35,7 @@
56 echo "!!! ${0##*/}: $mysrc does not exist" 1>&2
57 false
58 fi
59 - ((ret+=$?))
60 + ((ret|=$?))
61 done
62
63 rm -rf "$TMP"
64
65 Modified: main/branches/2.1.6/bin/ebuild-helpers/doins
66 ===================================================================
67 --- main/branches/2.1.6/bin/ebuild-helpers/doins 2009-04-30 06:45:37 UTC (rev 13422)
68 +++ main/branches/2.1.6/bin/ebuild-helpers/doins 2009-04-30 06:45:51 UTC (rev 13423)
69 @@ -89,9 +89,9 @@
70 mv "$TMP/1/$x_orig" "$x"
71 fi
72 while popd >/dev/null 2>&1 ; do true ; done
73 - ((++success))
74 + ((success|=1))
75 else
76 - _doins "${x}" && ((++success))
77 + _doins "${x}" && ((success|=1))
78 fi
79 done
80 rm -rf "$TMP"
81
82 Modified: main/branches/2.1.6/bin/ebuild-helpers/dolib
83 ===================================================================
84 --- main/branches/2.1.6/bin/ebuild-helpers/dolib 2009-04-30 06:45:37 UTC (rev 13422)
85 +++ main/branches/2.1.6/bin/ebuild-helpers/dolib 2009-04-30 06:45:51 UTC (rev 13423)
86 @@ -35,7 +35,7 @@
87 echo "!!! ${0##*/}: ${x} does not exist" 1>&2
88 false
89 fi
90 - ((ret+=$?))
91 + ((ret|=$?))
92 done
93
94 exit ${ret}
95
96 Modified: main/branches/2.1.6/bin/ebuild-helpers/doman
97 ===================================================================
98 --- main/branches/2.1.6/bin/ebuild-helpers/doman 2009-04-30 06:45:37 UTC (rev 13422)
99 +++ main/branches/2.1.6/bin/ebuild-helpers/doman 2009-04-30 06:45:51 UTC (rev 13423)
100 @@ -48,14 +48,14 @@
101 fi
102
103 install -m0644 "${x}" "${D}/usr/share/man/${mandir}/${name}"
104 - ((ret+=$?))
105 + ((ret|=$?))
106 elif [[ ! -e ${x} ]] ; then
107 echo "!!! ${0##*/}: $x does not exist" 1>&2
108 - ((++ret))
109 + ((ret|=1))
110 fi
111 else
112 vecho "doman: '${x}' is probably not a man page; skipping" 1>&2
113 - ((++ret))
114 + ((ret|=1))
115 fi
116 done
117
118
119 Modified: main/branches/2.1.6/bin/ebuild-helpers/domo
120 ===================================================================
121 --- main/branches/2.1.6/bin/ebuild-helpers/domo 2009-04-30 06:45:37 UTC (rev 13422)
122 +++ main/branches/2.1.6/bin/ebuild-helpers/domo 2009-04-30 06:45:51 UTC (rev 13423)
123 @@ -26,7 +26,7 @@
124 echo "!!! ${0##*/}: $x does not exist" 1>&2
125 false
126 fi
127 - ((ret+=$?))
128 + ((ret|=$?))
129 done
130
131 exit $ret
132
133 Modified: main/branches/2.1.6/bin/ebuild-helpers/dosbin
134 ===================================================================
135 --- main/branches/2.1.6/bin/ebuild-helpers/dosbin 2009-04-30 06:45:37 UTC (rev 13422)
136 +++ main/branches/2.1.6/bin/ebuild-helpers/dosbin 2009-04-30 06:45:51 UTC (rev 13423)
137 @@ -21,7 +21,7 @@
138 echo "!!! ${0##*/}: ${x} does not exist" 1>&2
139 false
140 fi
141 - ((ret+=$?))
142 + ((ret|=$?))
143 done
144
145 exit ${ret}
146
147 Modified: main/branches/2.1.6/bin/ebuild-helpers/dosed
148 ===================================================================
149 --- main/branches/2.1.6/bin/ebuild-helpers/dosed 2009-04-30 06:45:37 UTC (rev 13422)
150 +++ main/branches/2.1.6/bin/ebuild-helpers/dosed 2009-04-30 06:45:51 UTC (rev 13423)
151 @@ -22,7 +22,7 @@
152 echo "${y} is not a regular file!" >&2
153 false
154 fi
155 - ((ret+=$?))
156 + ((ret|=$?))
157 else
158 mysed="${x}"
159 fi
160 @@ -30,7 +30,7 @@
161
162 if [ $file_found = 0 ] ; then
163 echo "!!! ${0##*/}: $y does not exist" 1>&2
164 - ((ret+=1))
165 + ((ret|=1))
166 fi
167
168 exit $ret
169
170 Modified: main/branches/2.1.6/bin/ebuild-helpers/ecompress
171 ===================================================================
172 --- main/branches/2.1.6/bin/ebuild-helpers/ecompress 2009-04-30 06:45:37 UTC (rev 13422)
173 +++ main/branches/2.1.6/bin/ebuild-helpers/ecompress 2009-04-30 06:45:51 UTC (rev 13423)
174 @@ -75,7 +75,7 @@
175 for x in "$@" ; do
176 [[ ${x##*.} =~ $mask_ext_re ]] && continue
177 filtered_args[$i]=$x
178 - (( i++ ))
179 + ((i|=1))
180 done
181 [ $i -eq 0 ] && exit 0
182 set -- "${filtered_args[@]}"
183
184 Modified: main/branches/2.1.6/bin/ebuild-helpers/ecompressdir
185 ===================================================================
186 --- main/branches/2.1.6/bin/ebuild-helpers/ecompressdir 2009-04-30 06:45:37 UTC (rev 13422)
187 +++ main/branches/2.1.6/bin/ebuild-helpers/ecompressdir 2009-04-30 06:45:51 UTC (rev 13423)
188 @@ -54,7 +54,7 @@
189
190 # first we act on all the files
191 find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary}
192 - ((ret+=$?))
193 + ((ret|=$?))
194
195 find "${dir}" -type l -print0 | \
196 while read -d $'\0' brokenlink ; do
197 @@ -67,7 +67,7 @@
198 [[ ${act} == "compress" ]] \
199 && ln -snf "${newdest}" "${brokenlink}${suffix}" \
200 || ln -snf "${newdest}" "${brokenlink%${suffix}}"
201 - ((ret+=$?))
202 + ((ret|=$?))
203 done
204 }
205
206
207 Modified: main/branches/2.1.6/bin/ebuild-helpers/prepallman
208 ===================================================================
209 --- main/branches/2.1.6/bin/ebuild-helpers/prepallman 2009-04-30 06:45:37 UTC (rev 13422)
210 +++ main/branches/2.1.6/bin/ebuild-helpers/prepallman 2009-04-30 06:45:51 UTC (rev 13423)
211 @@ -11,7 +11,7 @@
212 while read mandir ; do
213 mandir=${mandir#${D}}
214 prepman "${mandir%/man}"
215 - ((ret+=$?))
216 + ((ret|=$?))
217 done < "${T}"/prepallman.filelist
218
219 exit ${ret}