Mailing List Archive

[PATCH] cuda.eclass: EAPI support: add 8, drop 5 and 6
Signed-off-by: Marek Szuba <marecki@gentoo.org>
---
eclass/cuda.eclass | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index b1da77c69dd..08d2302d55b 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -1,11 +1,11 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

case "${EAPI:-0}" in
- 0|1|2|3|4)
+ [0-6])
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
- 5|6|7)
+ 7|8)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
@@ -15,7 +15,7 @@ esac
# @ECLASS: cuda.eclass
# @MAINTAINER:
# Gentoo Science Project <sci@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Common functions for cuda packages
# @DESCRIPTION:
# This eclass contains functions to be used with cuda package. Currently it is
--
2.31.1
Re: [PATCH] cuda.eclass: EAPI support: add 8, drop 5 and 6 [ In reply to ]
>>>>> On Thu, 15 Jul 2021, Marek Szuba wrote:

> case "${EAPI:-0}" in
> - 0|1|2|3|4)
> + [0-6])
> die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
> ;;
> - 5|6|7)
> + 7|8)
> ;;
> *)
> die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"

In the latest bunch of updates, we have changed many eclasses to have
only a single error case, and also standardized the die message.
Maybe simplify this eclass as well?

case ${EAPI} in
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
Re: [PATCH] cuda.eclass: EAPI support: add 8, drop 5 and 6 [ In reply to ]
On 2021-07-15 06:58, Ulrich Mueller wrote:

> In the latest bunch of updates, we have changed many eclasses to have
> only a single error case, and also standardized the die message.
> Maybe simplify this eclass as well?

If anyone from Sci suggests/seconds this I shall not argue, that said I
do in fact like having both the two cases separate and the eclass name
in the die message - so between that and the fact we have already got
EAPI 8-compatible eclasses in the tree which do it this way, I am
leaving this part be at present.

--
Marecki
Re: [PATCH] cuda.eclass: EAPI support: add 8, drop 5 and 6 [ In reply to ]
> On 15 Jul 2021, at 21:41, Marek Szuba <marecki@gentoo.org> wrote:
>
> On 2021-07-15 06:58, Ulrich Mueller wrote:
>
>> In the latest bunch of updates, we have changed many eclasses to have
>> only a single error case, and also standardized the die message.
>> Maybe simplify this eclass as well?
>
> If anyone from Sci suggests/seconds this I shall not argue, that said I do in fact like having both the two cases separate and the eclass name in the die message - so between that and the fact we have already got EAPI 8-compatible eclasses in the tree which do it this way, I am leaving this part be at present.
>

I'd prefer the consistency given that's what we're moving towards, if possible.