diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-09 20:37:56 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-09 20:37:56 +0000 |
commit | 14efc18eb873f6ec0002c41d7a772b26f132f1b3 (patch) | |
tree | 791f1c1de0707e6d0b728f2bac5a357f27882199 | |
parent | 39a97c03ea7b9116334384760502a06f5ba87ae6 (diff) | |
download | portage-14efc18eb873f6ec0002c41d7a772b26f132f1b3.tar.gz portage-14efc18eb873f6ec0002c41d7a772b26f132f1b3.tar.bz2 portage-14efc18eb873f6ec0002c41d7a772b26f132f1b3.zip |
Add more QA warnings for econf calls during unexpected phases. Thanks to
Diego Elio Pettenò <flameeyes@g.o> for the suggestion.
svn path=/main/trunk/; revision=12808
-rwxr-xr-x | bin/ebuild.sh | 15 |
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 |