summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-08-01 13:02:32 +0000
committerMichał Górny <mgorny@gentoo.org>2013-08-01 13:02:32 +0000
commitfba8e7d1db504e1a7c735164be3ba4727e70cfdb (patch)
tree8e97fa972c8be69d3e54c024a3b736b6f7c850bd /eclass/distutils-r1.eclass
parentStable for x86, wrt bug #478316 (diff)
downloadgentoo-2-fba8e7d1db504e1a7c735164be3ba4727e70cfdb.tar.gz
gentoo-2-fba8e7d1db504e1a7c735164be3ba4727e70cfdb.tar.bz2
gentoo-2-fba8e7d1db504e1a7c735164be3ba4727e70cfdb.zip
Shout QA warnings when _all() phases do not call the default impls. Bug #478442.
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r--eclass/distutils-r1.eclass18
1 files changed, 17 insertions, 1 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index ac47650b90a5..81e5824b8122 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.73 2013/07/21 19:00:56 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.74 2013/08/01 13:02:32 mgorny Exp $
# @ECLASS: distutils-r1
# @MAINTAINER:
@@ -344,6 +344,8 @@ distutils-r1_python_prepare_all() {
# create source copies for each implementation
python_copy_sources
fi
+
+ _DISTUTILS_DEFAULT_CALLED=1
}
# @FUNCTION: distutils-r1_python_prepare
@@ -494,6 +496,8 @@ distutils-r1_python_install_all() {
doins -r "${EXAMPLES[@]}"
docompress -x "${INSDESTTREE}"
fi
+
+ _DISTUTILS_DEFAULT_CALLED=1
}
# @FUNCTION: distutils-r1_run_phase
@@ -586,6 +590,8 @@ _distutils-r1_run_foreach_impl() {
distutils-r1_src_prepare() {
debug-print-function ${FUNCNAME} "${@}"
+ local _DISTUTILS_DEFAULT_CALLED
+
# common preparations
if declare -f python_prepare_all >/dev/null; then
python_prepare_all
@@ -593,6 +599,10 @@ distutils-r1_src_prepare() {
distutils-r1_python_prepare_all
fi
+ if [[ ! ${_DISTUTILS_DEFAULT_CALLED} ]]; then
+ eqawarn "QA warning: python_prepare_all() didn't call distutils-r1_python_prepare_all"
+ fi
+
if declare -f python_prepare >/dev/null; then
_distutils-r1_run_foreach_impl python_prepare
fi
@@ -643,11 +653,17 @@ distutils-r1_src_install() {
_distutils-r1_run_foreach_impl distutils-r1_python_install
fi
+ local _DISTUTILS_DEFAULT_CALLED
+
if declare -f python_install_all >/dev/null; then
_distutils-r1_run_common_phase python_install_all
else
_distutils-r1_run_common_phase distutils-r1_python_install_all
fi
+
+ if [[ ! ${_DISTUTILS_DEFAULT_CALLED} ]]; then
+ eqawarn "QA warning: python_install_all() didn't call distutils-r1_python_install_all"
+ fi
}
_DISTUTILS_R1=1