1 |
commit: 47e121c17c2c0ab7381bfd7267b26fa3e4beaba4 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 20 21:15:19 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 20 21:15:19 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47e121c1 |
7 |
|
8 |
rpm.eclass: [QA] add EAPI guard |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
12 |
|
13 |
eclass/rpm.eclass | 17 ++++++++++++++--- |
14 |
1 file changed, 14 insertions(+), 3 deletions(-) |
15 |
|
16 |
diff --git a/eclass/rpm.eclass b/eclass/rpm.eclass |
17 |
index d27f0a386c7..19a89a3c0cb 100644 |
18 |
--- a/eclass/rpm.eclass |
19 |
+++ b/eclass/rpm.eclass |
20 |
@@ -1,12 +1,23 @@ |
21 |
-# Copyright 1999-2020 Gentoo Authors |
22 |
+# Copyright 1999-2021 Gentoo Authors |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
# @ECLASS: rpm.eclass |
26 |
# @MAINTAINER: |
27 |
# base-system@g.o |
28 |
# @BLURB: convenience class for extracting RPMs |
29 |
+# @SUPPORTED_EAPIS: 5 6 7 |
30 |
|
31 |
-inherit estack eutils |
32 |
+case ${EAPI:-0} in |
33 |
+ [567]) inherit eutils ;; |
34 |
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
35 |
+esac |
36 |
+ |
37 |
+EXPORT_FUNCTIONS src_unpack |
38 |
+ |
39 |
+if [[ -z ${_RPM_ECLASS} ]] ; then |
40 |
+_RPM_ECLASS=1 |
41 |
+ |
42 |
+inherit estack |
43 |
|
44 |
case "${EAPI:-0}" in |
45 |
[0-6]) DEPEND=">=app-arch/rpm2targz-9.0.0.3g" ;; |
46 |
@@ -126,4 +137,4 @@ rpm_spec_epatch() { |
47 |
eend |
48 |
} |
49 |
|
50 |
-EXPORT_FUNCTIONS src_unpack |
51 |
+fi |