waf-utils.eclass: Ban non-python-r1 uses
authorMichał Górny <mgorny@gentoo.org>
Sun, 28 Feb 2016 17:29:13 +0000 (18:29 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sun, 28 Feb 2016 18:02:06 +0000 (19:02 +0100)
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

index e9560496aa7ea5f1e560b7bc03f16cc20e0e9007..4f08757bdd71a9335b1d8cb39648d9d0ee5e373f 100644 (file)
@@ -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