summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-04-30 06:45:51 +0000
committerZac Medico <zmedico@gentoo.org>2009-04-30 06:45:51 +0000
commitd60e4ffb4b1f9a24dbb97cca9409affced854008 (patch)
tree5950f3b0548c5875d17ef205579830872ab11b06 /bin
parentBug #243220 - Show messages in emerge.log when old versions are uninstalled (diff)
downloadportage-multirepo-d60e4ffb4b1f9a24dbb97cca9409affced854008.tar.gz
portage-multirepo-d60e4ffb4b1f9a24dbb97cca9409affced854008.tar.bz2
portage-multirepo-d60e4ffb4b1f9a24dbb97cca9409affced854008.zip
In order to eliminate the possibility of integer overflay, replace things like
((ret+=$?)) with ((ret|=$?)). Thanks to zong_sharo for the suggestion. (trunk r13242) svn path=/main/branches/2.1.6/; revision=13423
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild-helpers/dobin2
-rwxr-xr-xbin/ebuild-helpers/dodoc2
-rwxr-xr-xbin/ebuild-helpers/doexe2
-rwxr-xr-xbin/ebuild-helpers/doins4
-rwxr-xr-xbin/ebuild-helpers/dolib2
-rwxr-xr-xbin/ebuild-helpers/doman6
-rwxr-xr-xbin/ebuild-helpers/domo2
-rwxr-xr-xbin/ebuild-helpers/dosbin2
-rwxr-xr-xbin/ebuild-helpers/dosed4
-rwxr-xr-xbin/ebuild-helpers/ecompress2
-rwxr-xr-xbin/ebuild-helpers/ecompressdir4
-rwxr-xr-xbin/ebuild-helpers/prepallman2
12 files changed, 17 insertions, 17 deletions
diff --git a/bin/ebuild-helpers/dobin b/bin/ebuild-helpers/dobin
index 958a37fe..87b773f8 100755
--- a/bin/ebuild-helpers/dobin
+++ b/bin/ebuild-helpers/dobin
@@ -23,7 +23,7 @@ for x in "$@" ; do
echo "!!! ${0##*/}: $x does not exist" 1>&2
false
fi
- ((ret+=$?))
+ ((ret|=$?))
done
exit ${ret}
diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc
index adf49d04..04275703 100755
--- a/bin/ebuild-helpers/dodoc
+++ b/bin/ebuild-helpers/dodoc
@@ -21,7 +21,7 @@ for x in "$@" ; do
ecompress --queue "${dir}/${x##*/}"
elif [ ! -e "${x}" ] ; then
echo "!!! ${0##*/}: $x does not exist" 1>&2
- ((++ret))
+ ((ret|=1))
fi
done
diff --git a/bin/ebuild-helpers/doexe b/bin/ebuild-helpers/doexe
index a6d679d0..00f43d0c 100755
--- a/bin/ebuild-helpers/doexe
+++ b/bin/ebuild-helpers/doexe
@@ -35,7 +35,7 @@ for x in "$@" ; do
echo "!!! ${0##*/}: $mysrc does not exist" 1>&2
false
fi
- ((ret+=$?))
+ ((ret|=$?))
done
rm -rf "$TMP"
diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index 8c06bfd9..82f0bf3b 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -89,9 +89,9 @@ for x in "$@" ; do
mv "$TMP/1/$x_orig" "$x"
fi
while popd >/dev/null 2>&1 ; do true ; done
- ((++success))
+ ((success|=1))
else
- _doins "${x}" && ((++success))
+ _doins "${x}" && ((success|=1))
fi
done
rm -rf "$TMP"
diff --git a/bin/ebuild-helpers/dolib b/bin/ebuild-helpers/dolib
index 6c6628bd..a158ecc0 100755
--- a/bin/ebuild-helpers/dolib
+++ b/bin/ebuild-helpers/dolib
@@ -35,7 +35,7 @@ for x in "$@" ; do
echo "!!! ${0##*/}: ${x} does not exist" 1>&2
false
fi
- ((ret+=$?))
+ ((ret|=$?))
done
exit ${ret}
diff --git a/bin/ebuild-helpers/doman b/bin/ebuild-helpers/doman
index 48abc39f..eb1f3114 100755
--- a/bin/ebuild-helpers/doman
+++ b/bin/ebuild-helpers/doman
@@ -48,14 +48,14 @@ for x in "$@" ; do
fi
install -m0644 "${x}" "${D}/usr/share/man/${mandir}/${name}"
- ((ret+=$?))
+ ((ret|=$?))
elif [[ ! -e ${x} ]] ; then
echo "!!! ${0##*/}: $x does not exist" 1>&2
- ((++ret))
+ ((ret|=1))
fi
else
vecho "doman: '${x}' is probably not a man page; skipping" 1>&2
- ((++ret))
+ ((ret|=1))
fi
done
diff --git a/bin/ebuild-helpers/domo b/bin/ebuild-helpers/domo
index f2ad3eae..88570c69 100755
--- a/bin/ebuild-helpers/domo
+++ b/bin/ebuild-helpers/domo
@@ -26,7 +26,7 @@ for x in "$@" ; do
echo "!!! ${0##*/}: $x does not exist" 1>&2
false
fi
- ((ret+=$?))
+ ((ret|=$?))
done
exit $ret
diff --git a/bin/ebuild-helpers/dosbin b/bin/ebuild-helpers/dosbin
index c9e85c0b..e850701e 100755
--- a/bin/ebuild-helpers/dosbin
+++ b/bin/ebuild-helpers/dosbin
@@ -21,7 +21,7 @@ for x in "$@" ; do
echo "!!! ${0##*/}: ${x} does not exist" 1>&2
false
fi
- ((ret+=$?))
+ ((ret|=$?))
done
exit ${ret}
diff --git a/bin/ebuild-helpers/dosed b/bin/ebuild-helpers/dosed
index abcb15a7..0510703f 100755
--- a/bin/ebuild-helpers/dosed
+++ b/bin/ebuild-helpers/dosed
@@ -22,7 +22,7 @@ for x in "$@" ; do
echo "${y} is not a regular file!" >&2
false
fi
- ((ret+=$?))
+ ((ret|=$?))
else
mysed="${x}"
fi
@@ -30,7 +30,7 @@ done
if [ $file_found = 0 ] ; then
echo "!!! ${0##*/}: $y does not exist" 1>&2
- ((ret+=1))
+ ((ret|=1))
fi
exit $ret
diff --git a/bin/ebuild-helpers/ecompress b/bin/ebuild-helpers/ecompress
index 6fdde571..8b4fb98a 100755
--- a/bin/ebuild-helpers/ecompress
+++ b/bin/ebuild-helpers/ecompress
@@ -75,7 +75,7 @@ case $1 in
for x in "$@" ; do
[[ ${x##*.} =~ $mask_ext_re ]] && continue
filtered_args[$i]=$x
- (( i++ ))
+ ((i|=1))
done
[ $i -eq 0 ] && exit 0
set -- "${filtered_args[@]}"
diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index 4dd35e54..297b4677 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -54,7 +54,7 @@ funk_up_dir() {
# first we act on all the files
find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary}
- ((ret+=$?))
+ ((ret|=$?))
find "${dir}" -type l -print0 | \
while read -d $'\0' brokenlink ; do
@@ -67,7 +67,7 @@ funk_up_dir() {
[[ ${act} == "compress" ]] \
&& ln -snf "${newdest}" "${brokenlink}${suffix}" \
|| ln -snf "${newdest}" "${brokenlink%${suffix}}"
- ((ret+=$?))
+ ((ret|=$?))
done
}
diff --git a/bin/ebuild-helpers/prepallman b/bin/ebuild-helpers/prepallman
index 747ed1fa..c9e1bdf4 100755
--- a/bin/ebuild-helpers/prepallman
+++ b/bin/ebuild-helpers/prepallman
@@ -11,7 +11,7 @@ find "${D}" -type d -name man > "${T}"/prepallman.filelist
while read mandir ; do
mandir=${mandir#${D}}
prepman "${mandir%/man}"
- ((ret+=$?))
+ ((ret|=$?))
done < "${T}"/prepallman.filelist
exit ${ret}