summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-01-31 08:20:22 +0000
committerZac Medico <zmedico@gentoo.org>2008-01-31 08:20:22 +0000
commit4ea29dcea49101c7e485af1b9d4d49a64d4ae445 (patch)
treec75e92b7e44dacf3142948661b6701c67cabfa84 /bin/ebuild.sh
parent9b4848b925380f17f4c18b65291127b4fc07460a (diff)
downloadportage-4ea29dcea49101c7e485af1b9d4d49a64d4ae445.tar.gz
portage-4ea29dcea49101c7e485af1b9d4d49a64d4ae445.tar.bz2
portage-4ea29dcea49101c7e485af1b9d4d49a64d4ae445.zip
- Remove ebuild.autotools repoman check since it produces lots
of false positives (bug #207104) and its hard to parse bash - Use QA_INTERCEPTORS in ebuild.sh to implement a runtime 'QA Notice' when autotools is called directly trunk r9235 svn path=/main/branches/2.1.2/; revision=9247
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh43
1 files changed, 29 insertions, 14 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 28ba561c4..8bcb3dd2b 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1579,9 +1579,17 @@ unset E_IUSE E_DEPEND E_RDEPEND E_PDEPEND
# Turn of extended glob matching so that g++ doesn't get incorrectly matched.
shopt -u extglob
-QA_INTERCEPTORS="javac java-config python python-config perl grep egrep fgrep sed gcc g++ cc bash awk nawk gawk pkg-config"
+if [[ ${EBUILD_PHASE} == depend ]] ; then
+ QA_INTERCEPTORS="awk bash cc egrep fgrep g++
+ gawk gcc grep javac java-config nawk perl
+ pkg-config python python-config sed"
+elif [[ ${EBUILD_PHASE} == clean* ]] ; then
+ unset QA_INTERCEPTORS
+else
+ QA_INTERCEPTORS="autoconf automake aclocal libtoolize"
+fi
# level the QA interceptors if we're in depend
-if hasq "depend" "${EBUILD_SH_ARGS}"; then
+if [[ -n ${QA_INTERCEPTORS} ]] ; then
for BIN in ${QA_INTERCEPTORS}; do
BIN_PATH=$(type -Pf ${BIN})
if [ "$?" != "0" ]; then
@@ -1589,14 +1597,27 @@ if hasq "depend" "${EBUILD_SH_ARGS}"; then
else
BODY="${BIN_PATH} \"\$@\"; return \$?"
fi
- FUNC_SRC="${BIN}() {
- if [ \$ECLASS_DEPTH -gt 0 ]; then
- eqawarn \"QA Notice: '${BIN}' called in global scope: eclass \${ECLASS}\"
+ if [[ ${EBUILD_PHASE} == depend ]] ; then
+ FUNC_SRC="${BIN}() {
+ if [ \$ECLASS_DEPTH -gt 0 ]; then
+ eqawarn \"QA Notice: '${BIN}' called in global scope: eclass \${ECLASS}\"
+ else
+ eqawarn \"QA Notice: '${BIN}' called in global scope: \${CATEGORY}/\${PF}\"
+ fi
+ ${BODY}
+ }"
+ elif hasq ${BIN} autoconf automake aclocal libtoolize ; then
+ FUNC_SRC="${BIN}() {
+ eqawarn \"QA Notice: '${BIN}' called by \${FUNCNAME[1]}: \${CATEGORY}/\${PF}\"
+ eqawarn \"Use autotools.eclass instead of calling '${BIN}' directly.\"
+ ${BODY}
+ }"
else
- eqawarn \"QA Notice: '${BIN}' called in global scope: \${CATEGORY}/\${PF}\"
+ FUNC_SRC="${BIN}() {
+ eqawarn \"QA Notice: '${BIN}' called by \${FUNCNAME[1]}: \${CATEGORY}/\${PF}\"
+ ${BODY}
+ }"
fi
- ${BODY}
- }";
eval "$FUNC_SRC" || echo "error creating QA interceptor ${BIN}" >&2
done
unset BIN_PATH BIN BODY FUNC_SRC
@@ -1720,12 +1741,6 @@ fi
#a reasonable default for $S
[[ -z ${S} ]] && export S=${WORKDIR}/${P}
-#wipe the interceptors. we don't want saved.
-if hasq "depend" "${EBUILD_SH_ARGS}"; then
- unset -f $QA_INTERCEPTORS
- unset QA_INTERCEPTORS
-fi
-
#some users have $TMP/$TMPDIR to a custom dir in their home ...
#this will cause sandbox errors with some ./configure
#scripts, so set it to $T.