aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-25 03:21:41 (GMT)
committerZac Medico <zmedico@gentoo.org>2012-10-25 03:21:41 (GMT)
commitf48625c547398ee5f92d33e16b1a837c3c595ae9 (patch)
tree3976ce87e11f42dca2211780bb2d1b267a2080ea
parentinstall_symlink_html_docs(): Additional fix for compatibility with subslots. (diff)
downloadportage-f48625c547398ee5f92d33e16b1a837c3c595ae9.zip
portage-f48625c547398ee5f92d33e16b1a837c3c595ae9.tar.gz
portage-f48625c547398ee5f92d33e16b1a837c3c595ae9.tar.bz2
Use checkbashisms for init.d scripts, bug #439490
-rwxr-xr-xbin/misc-functions.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 9b28058..db023e4 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -558,6 +558,23 @@ install_qa_check() {
done
done
+ local checkbashisms=$(type -P checkbashisms)
+ if [[ -n ${checkbashisms} ]] ; then
+ for d in /etc/init.d ; do
+ [[ -d ${ED}${d} ]] || continue
+ for i in "${ED}${d}"/* ; do
+ [[ -e ${i} ]] || continue
+ [[ -L ${i} ]] && continue
+ f=$("${checkbashisms}" -f "${i}" 2>&1)
+ [[ $? != 0 && -n ${f} ]] || continue
+ eqawarn "QA Notice: shell script appears to use non-POSIX feature(s):"
+ while read -r ;
+ do eqawarn " ${REPLY}"
+ done <<< "${f//${ED}}"
+ done
+ done
+ fi
+
# Look for leaking LDFLAGS into pkg-config files
f=$(egrep -sH '^Libs.*-Wl,(-O[012]|--hash-style)' "${ED}"/usr/*/pkgconfig/*.pc)
if [[ -n ${f} ]] ; then