commit:     dc940d4b2167447e646e2ec69432764d5bcc96bf
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 23 23:38:53 2016 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Apr 23 23:39:19 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc940d4b

ssl-cert.eclass: guard against EAPI=0

 eclass/ssl-cert.eclass | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
index 4f573ba..f41dc3c 100644
--- a/eclass/ssl-cert.eclass
+++ b/eclass/ssl-cert.eclass
@@ -13,6 +13,18 @@
 # @EXAMPLE:
 # "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem}
 
+# Guard against unsupported EAPIs.  We need EAPI >= 1 for slot dependencies.
+case "${EAPI:-0}" in
+       0)
+               die "${ECLASS}.eclass: EAPI=0 is not supported.  Please upgrade 
to EAPI >= 1."
+               ;;
+       1|2|3|4|5|6)
+               ;;
+       *)
+               die "${ECLASS}.eclass: EAPI=${EAPI} is not supported yet."
+               ;;
+esac
+
 # @ECLASS-VARIABLE: SSL_CERT_MANDATORY
 # @DESCRIPTION:
 # Set to non zero if ssl-cert is mandatory for ebuild.

Reply via email to