commit: 4d90c2033b85e64c3b6be717a930be84f629f35c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 7 21:37:52 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 8 18:21:16 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d90c203
portability.eclass: add global-scope ewarn for deprecated < EAPI 7
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/portability.eclass | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/eclass/portability.eclass b/eclass/portability.eclass
index 78da440e22dd..926ac8b8b825 100644
--- a/eclass/portability.eclass
+++ b/eclass/portability.eclass
@@ -9,14 +9,18 @@
# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: This eclass is created to avoid using non-portable GNUisms inside
ebuilds
+if [[ -z ${_PORTABILITY_ECLASS} ]]; then
+_PORTABILITY_ECLASS=1
+
case ${EAPI} in
- 6|7|8) ;;
+ 6)
+ ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated
EAPI ${EAPI}!"
+ ewarn "${CATEGORY}/${PF}: Support will be removed on
2024-10-08. Please port to newer EAPI."
+ ;;
+ 7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ -z ${_PORTABILITY_ECLASS} ]]; then
-_PORTABILITY_ECLASS=1
-
# @FUNCTION: treecopy
# @USAGE: <orig1> [orig2 orig3 ....] <dest>
# @DESCRIPTION: