summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-20 23:15:37 +0200
committerDavid Seifert <soap@gentoo.org>2021-06-20 23:15:37 +0200
commit9c26eb4a1cc5bbb7bd1164b757c2a6fcdf37d85c (patch)
treebdb7567787aca9ff3aea3b657ec3fd4abaf78701
parentuser.eclass: [QA] add @SUPPORTED_EAPIS tag (diff)
downloadgentoo-9c26eb4a1cc5bbb7bd1164b757c2a6fcdf37d85c.tar.gz
gentoo-9c26eb4a1cc5bbb7bd1164b757c2a6fcdf37d85c.tar.bz2
gentoo-9c26eb4a1cc5bbb7bd1164b757c2a6fcdf37d85c.zip
user-info.eclass: [QA] add EAPI guard
* Declare suppported EAPIs. * Add EAPI guard to prevent newer/older unsupported EAPIs from using this eclass when they've not been tested/eclass isn't adapted for it. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--eclass/user-info.eclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/eclass/user-info.eclass b/eclass/user-info.eclass
index 15e9238ab44..d349fc17476 100644
--- a/eclass/user-info.eclass
+++ b/eclass/user-info.eclass
@@ -1,12 +1,18 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: user-info.eclass
# @MAINTAINER:
# base-system@gentoo.org (Linux)
# Michał Górny <mgorny@gentoo.org> (NetBSD)
+# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: Read-only access to user and group information
+case ${EAPI:-0} in
+ [567]) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_USER_INFO_ECLASS} ]]; then
_USER_INFO_ECLASS=1