Gentoo Archives: gentoo-dev

From: Eray Aslan <eras@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH v2] ssl-cert.eclass: add EAPI 8 support
Date: Wed, 15 Sep 2021 06:27:19
Message-Id: YUGSM2P1JNz7xnqT@angelfall.a21an.org
1 - drop support for EAPI < 6
2 - add guard
3
4 Signed-off-by: Eray Aslan <eras@g.o>
5 ---
6 eclass/ssl-cert.eclass | 22 ++++++++++------------
7 1 file changed, 10 insertions(+), 12 deletions(-)
8
9 diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
10 index 36945be3cd6..9d01fd10f50 100644
11 --- a/eclass/ssl-cert.eclass
12 +++ b/eclass/ssl-cert.eclass
13 @@ -6,7 +6,7 @@
14 # maintainer-needed@g.o
15 # @AUTHOR:
16 # Max Kalika <max@g.o>
17 -# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
18 +# @SUPPORTED_EAPIS: 6 7 8
19 # @BLURB: Eclass for SSL certificates
20 # @DESCRIPTION:
21 # This eclass implements a standard installation procedure for installing
22 @@ -14,18 +14,14 @@
23 # @EXAMPLE:
24 # "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem}
25
26 -# Guard against unsupported EAPIs. We need EAPI >= 1 for slot dependencies.
27 -case "${EAPI:-0}" in
28 - 0)
29 - die "${ECLASS}.eclass: EAPI=0 is not supported. Please upgrade to EAPI >= 1."
30 - ;;
31 - 1|2|3|4|5|6|7)
32 - ;;
33 - *)
34 - die "${ECLASS}.eclass: EAPI=${EAPI} is not supported yet."
35 - ;;
36 +case "${EAPI}" in
37 + 6|7|8) ;;
38 + *) die "EAPI=${EAPI:-0} is not supported" ;;
39 esac
40
41 +if [[ ! ${_SSL_CERT_ECLASS} ]]; then
42 +_SSL_CERT_ECLASS=1
43 +
44 # @ECLASS-VARIABLE: SSL_CERT_MANDATORY
45 # @PRE_INHERIT
46 # @DESCRIPTION:
47 @@ -53,7 +49,7 @@ if [[ "${SSL_DEPS_SKIP}" == "0" ]]; then
48 fi
49
50 case "${EAPI}" in
51 - 1|2|3|4|5|6)
52 + 6)
53 DEPEND="${SSL_DEPEND}"
54 ;;
55 *)
56 @@ -283,3 +279,5 @@ install_cert() {
57 ewarn "Some requested certificates were not generated"
58 fi
59 }
60 +
61 +fi
62 --
63 2.33.0

Replies