summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-20 23:15:19 +0200
committerDavid Seifert <soap@gentoo.org>2021-06-20 23:15:19 +0200
commit47e121c17c2c0ab7381bfd7267b26fa3e4beaba4 (patch)
tree2a690d76722d72faa1f07cef24f2f0738bee582b /eclass/rpm.eclass
parentros-catkin.eclass: [QA] add EAPI guard (diff)
downloadgentoo-47e121c17c2c0ab7381bfd7267b26fa3e4beaba4.tar.gz
gentoo-47e121c17c2c0ab7381bfd7267b26fa3e4beaba4.tar.bz2
gentoo-47e121c17c2c0ab7381bfd7267b26fa3e4beaba4.zip
rpm.eclass: [QA] add EAPI guard
Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/rpm.eclass')
-rw-r--r--eclass/rpm.eclass17
1 files changed, 14 insertions, 3 deletions
diff --git a/eclass/rpm.eclass b/eclass/rpm.eclass
index d27f0a386c7..19a89a3c0cb 100644
--- a/eclass/rpm.eclass
+++ b/eclass/rpm.eclass
@@ -1,12 +1,23 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: rpm.eclass
# @MAINTAINER:
# base-system@gentoo.org
# @BLURB: convenience class for extracting RPMs
+# @SUPPORTED_EAPIS: 5 6 7
-inherit estack eutils
+case ${EAPI:-0} in
+ [567]) inherit eutils ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+EXPORT_FUNCTIONS src_unpack
+
+if [[ -z ${_RPM_ECLASS} ]] ; then
+_RPM_ECLASS=1
+
+inherit estack
case "${EAPI:-0}" in
[0-6]) DEPEND=">=app-arch/rpm2targz-9.0.0.3g" ;;
@@ -126,4 +137,4 @@ rpm_spec_epatch() {
eend
}
-EXPORT_FUNCTIONS src_unpack
+fi