---
 eclass/epatch.eclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass
index 905f68f8ef22..8e03478c26ce 100644
--- a/eclass/epatch.eclass
+++ b/eclass/epatch.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: epatch.eclass
@@ -11,6 +11,13 @@
 
 if [[ -z ${_EPATCH_ECLASS} ]]; then
 
+case ${EAPI:-0} in
+       0|1|2|3|4|5|6)
+               ;;
+       *)
+               die "${ECLASS}: banned in EAPI=${EAPI}; use eapply* instead";;
+esac
+
 inherit estack
 
 # @VARIABLE: EPATCH_SOURCE
-- 
2.16.2


Reply via email to