summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-11 07:39:58 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-11 07:39:58 +0000
commita82fc235ece39a45fa8c8db1419307225aa7b61f (patch)
tree4f45bafbb47b7dc2fa9cd2abde70cb81e16efc7e /bin
parent23deeae518bd04a9d8b2523c46c8b33e0b4760de (diff)
downloadportage-a82fc235ece39a45fa8c8db1419307225aa7b61f.tar.gz
portage-a82fc235ece39a45fa8c8db1419307225aa7b61f.tar.bz2
portage-a82fc235ece39a45fa8c8db1419307225aa7b61f.zip
Add more QA warnings for econf calls during unexpected phases. Thanks to
Diego Elio Pettenò <flameeyes@g.o> for the suggestion. (trunk r12808) svn path=/main/branches/2.1.6/; revision=13040
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index e2a796765..09bc8f960 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -468,9 +468,18 @@ hasgq() { hasg "$@" >/dev/null ; }
econf() {
local x
- ! hasq "$EAPI" 0 1 && [[ $EBUILD_PHASE = compile && \
- $(type -t src_configure) = function ]] && \
- eqawarn "econf called in src_compile instead of src_configure"
+ local phase_func=$(_ebuild_arg_to_phase "$EAPI" "$EBUILD_PHASE")
+ if [[ -n $phase_func ]] ; then
+ if hasq "$EAPI" 0 1 ; then
+ [[ $phase_func != src_compile ]] && \
+ eqawarn "QA Notice: econf called in" \
+ "$phase_func instead of src_compile"
+ else
+ [[ $phase_func != src_configure ]] && \
+ eqawarn "QA Notice: econf called in" \
+ "$phase_func instead of src_configure"
+ fi
+ fi
: ${ECONF_SOURCE:=.}
if [ -x "${ECONF_SOURCE}/configure" ]; then