commit:     fe85423a8fb0061d0e203ad8d4f02ab7849653c6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 28 17:29:13 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Feb 28 18:02:06 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe85423a

waf-utils.eclass: Ban non-python-r1 uses

Apply the ban for waf-utils.eclass uses without any of the python-r1
suite eclasses, that was due for almost a year.

 eclass/waf-utils.eclass | 36 +++++++++++++++++++++---------------
 1 file changed, 21 insertions(+), 15 deletions(-)

diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass
index e956049..4f08757 100644
--- a/eclass/waf-utils.eclass
+++ b/eclass/waf-utils.eclass
@@ -41,34 +41,40 @@ DEPEND="${DEPEND}
 waf-utils_src_configure() {
        debug-print-function ${FUNCNAME} "$@"
 
+       local fail
        if [[ ! ${_PYTHON_ANY_R1} && ! ${_PYTHON_SINGLE_R1} && ! ${_PYTHON_R1} 
]]; then
-               eqawarn "Using waf-utils.eclass without any python-r1 suite 
eclass is not supported"
-               eqawarn "and will be banned on 2015-01-24. Please make sure to 
configure and inherit"
-               eqawarn "appropriate -r1 eclass. For more information and 
examples, please see:"
-               eqawarn "    
https://wiki.gentoo.org/wiki/Project:Python/waf-utils_integration";
+               eerror "Using waf-utils.eclass without any python-r1 suite 
eclass is not supported."
+               eerror "Please make sure to configure and inherit appropriate 
-r1 eclass."
+               eerror "For more information and examples, please see:"
+               eerror "    
https://wiki.gentoo.org/wiki/Project:Python/waf-utils_integration";
+               fail=1
        else
                if [[ ! ${EPYTHON} ]]; then
-                       eqawarn "EPYTHON is unset while calling waf-utils. This 
most likely means that"
-                       eqawarn "the ebuild did not call the appropriate eclass 
function before calling waf."
+                       eerror "EPYTHON is unset while calling waf-utils. This 
most likely means that"
+                       eerror "the ebuild did not call the appropriate eclass 
function before calling waf."
                        if [[ ${_PYTHON_ANY_R1} ]]; then
-                               eqawarn "Please ensure that 
python-any-r1_pkg_setup is called in pkg_setup()."
+                               eerror "Please ensure that 
python-any-r1_pkg_setup is called in pkg_setup()."
                        elif [[ ${_PYTHON_SINGLE_R1} ]]; then
-                               eqawarn "Please ensure that 
python-single-r1_pkg_setup is called in pkg_setup()."
+                               eerror "Please ensure that 
python-single-r1_pkg_setup is called in pkg_setup()."
                        else # python-r1
-                               eqawarn "Please ensure that python_setup is 
called before waf-utils_src_configure(),"
-                               eqawarn "or that the latter is used within 
python_foreach_impl as appropriate."
+                               eerror "Please ensure that python_setup is 
called before waf-utils_src_configure(),"
+                               eerror "or that the latter is used within 
python_foreach_impl as appropriate."
                        fi
-                       eqawarn
+                       eerror
+                       fail=1
                fi
 
                if [[ ${PYTHON_REQ_USE} != *threads* ]]; then
-                       eqawarn "Waf requires threading support in Python. To 
accomodate this requirement,"
-                       eqawarn "please add 'threads(+)' to PYTHON_REQ_USE 
variable (above inherit line)."
-                       eqawarn "For more information and examples, please see:"
-                       eqawarn "    
https://wiki.gentoo.org/wiki/Project:Python/waf-utils_integration";
+                       eerror "Waf requires threading support in Python. To 
accomodate this requirement,"
+                       eerror "please add 'threads(+)' to PYTHON_REQ_USE 
variable (above inherit line)."
+                       eerror "For more information and examples, please see:"
+                       eerror "    
https://wiki.gentoo.org/wiki/Project:Python/waf-utils_integration";
+                       fail=1
                fi
        fi
 
+       [[ ${fail} ]] || die "Invalid use of ${ECLASS}"
+
        local libdir=""
 
        # @ECLASS-VARIABLE: WAF_BINARY

Reply via email to