Mailing List Archive

[PATCH] ssl-cert.eclass: EAPI 8 support and add guard
---
eclass/ssl-cert.eclass | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
index 36945be3cd6..e5dfbbb141c 100644
--- a/eclass/ssl-cert.eclass
+++ b/eclass/ssl-cert.eclass
@@ -6,7 +6,7 @@
# maintainer-needed@gentoo.org
# @AUTHOR:
# Max Kalika <max@gentoo.org>
-# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
+# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7 8
# @BLURB: Eclass for SSL certificates
# @DESCRIPTION:
# This eclass implements a standard installation procedure for installing
@@ -19,13 +19,15 @@ case "${EAPI:-0}" in
0)
die "${ECLASS}.eclass: EAPI=0 is not supported. Please upgrade to EAPI >= 1."
;;
- 1|2|3|4|5|6|7)
+ 1|2|3|4|5|6|7|8)
;;
*)
die "${ECLASS}.eclass: EAPI=${EAPI} is not supported yet."
;;
esac

+if [[ ! ${_SSL_CERT_ECLASS} ]]; then
+
# @ECLASS-VARIABLE: SSL_CERT_MANDATORY
# @PRE_INHERIT
# @DESCRIPTION:
@@ -283,3 +285,6 @@ install_cert() {
ewarn "Some requested certificates were not generated"
fi
}
+
+_SSL_CERT_ECLASS=1
+fi
--
2.33.0
Re: [PATCH] ssl-cert.eclass: EAPI 8 support and add guard [ In reply to ]
On Tue, 2021-09-14 at 16:47 +0300, Eray Aslan wrote:
> ---
>  eclass/ssl-cert.eclass | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
> index 36945be3cd6..e5dfbbb141c 100644
> --- a/eclass/ssl-cert.eclass
> +++ b/eclass/ssl-cert.eclass
> @@ -6,7 +6,7 @@
>  # maintainer-needed@gentoo.org
>  # @AUTHOR:
>  # Max Kalika <max@gentoo.org>
> -# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
> +# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7 8
>  # @BLURB: Eclass for SSL certificates
>  # @DESCRIPTION:
>  # This eclass implements a standard installation procedure for
> installing
> @@ -19,13 +19,15 @@ case "${EAPI:-0}" in
>         0)
>                 die "${ECLASS}.eclass: EAPI=0 is not supported. 
> Please upgrade to EAPI >= 1."
>                 ;;
> -       1|2|3|4|5|6|7)
> +       1|2|3|4|5|6|7|8)
>                 ;;
>         *)
>                 die "${ECLASS}.eclass: EAPI=${EAPI} is not supported
> yet."
>                 ;;
>  esac
>  
> +if [[ ! ${_SSL_CERT_ECLASS} ]]; then
> +
>  # @ECLASS-VARIABLE: SSL_CERT_MANDATORY
>  # @PRE_INHERIT
>  # @DESCRIPTION:
> @@ -283,3 +285,6 @@ install_cert() {
>                 ewarn "Some requested certificates were not generated"
>         fi
>  }
> +
> +_SSL_CERT_ECLASS=1
> +fi

Please remove support for EAPIs < 6.
Re: [PATCH] ssl-cert.eclass: EAPI 8 support and add guard [ In reply to ]
>>>>> On Tue, 14 Sep 2021, Eray Aslan wrote:

> +if [[ ! ${_SSL_CERT_ECLASS} ]]; then
> +
> # @ECLASS-VARIABLE: SSL_CERT_MANDATORY
> # @PRE_INHERIT
> # @DESCRIPTION:
> @@ -283,3 +285,6 @@ install_cert() {
> ewarn "Some requested certificates were not generated"
> fi
> }
> +
> +_SSL_CERT_ECLASS=1

Please make this the first statement in the "if" block. (At the moment
it doesn't matter, but it's less error prone in case another eclass will
be inherited later.)