Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 20 Jun 2021 21:16:19
Message-Id: 1624223722.0b6e3e854ff7870ff220cb8b69915714f99b22d6.soap@gentoo
1 commit: 0b6e3e854ff7870ff220cb8b69915714f99b22d6
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 20 21:15:22 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 20 21:15:22 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b6e3e85
7
8 ruby-utils.eclass: [QA] add EAPI guard
9
10 * Add EAPI inherit guard
11 * Declare supported EAPIs
12
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14 Signed-off-by: David Seifert <soap <AT> gentoo.org>
15
16 eclass/ruby-utils.eclass | 7 ++++++-
17 1 file changed, 6 insertions(+), 1 deletion(-)
18
19 diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass
20 index e5752dca2d7..82e09cf49cb 100644
21 --- a/eclass/ruby-utils.eclass
22 +++ b/eclass/ruby-utils.eclass
23 @@ -1,4 +1,4 @@
24 -# Copyright 1999-2020 Gentoo Authors
25 +# Copyright 1999-2021 Gentoo Authors
26 # Distributed under the terms of the GNU General Public License v2
27
28 # @ECLASS: ruby-utils.eclass
29 @@ -7,6 +7,7 @@
30 # @AUTHOR:
31 # Author: Hans de Graaff <graaff@g.o>
32 # @BLURB: An eclass for supporting ruby scripts and bindings in non-ruby packages
33 +# @SUPPORTED_EAPIS: 5 6 7
34 # @DESCRIPTION:
35 # The ruby-utils eclass is designed to allow an easier installation of
36 # Ruby scripts and bindings for non-ruby packages.
37 @@ -14,6 +15,10 @@
38 # This eclass does not set any metadata variables nor export any phase
39 # functions. It can be inherited safely.
40
41 +case ${EAPI:-0} in
42 + [567]) ;;
43 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
44 +esac
45
46 if [[ ! ${_RUBY_UTILS} ]]; then