EAPI 6 prohibits dying in global scope.  Move that check to pkg_setup.

---
 eclass/kernel-2.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 547153c..91a24e9 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -544,9 +544,6 @@ elif [[ ${ETYPE} == headers ]]; then
        unset KBUILD_OUTPUT

        SLOT="0"
-else
-       eerror "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\""
-       die "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\""
 fi

 # Cross-compile support functions
@@ -1371,6 +1368,11 @@ kernel-2_pkg_setup() {
        fi

        ABI="${KERNEL_ABI}"
+       if [[ ${ETYPE} != sources ]] && [[ ${ETYPE} != headers ]]; then
+               eerror "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or 
\"headers\""
+               die "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or 
\"headers\""
+       fi
+
        [[ ${ETYPE} == headers ]] && setup_headers
        [[ ${ETYPE} == sources ]] && echo ">>> Preparing to unpack ..."
 }
-- 
2.7.3


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to