commit:     7ed6eeff7cb9d9bd295129804bf6776b50a47b27
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 25 15:32:49 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Nov  4 20:46:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ed6eeff

user.eclass: Deprecate general use for future EAPIs.

No functional difference for existing EAPIs.

Reviewed-by: David Seifert <soap <AT> gentoo.org>
Reviewed-by: Michał Górny <mgorny <AT> gentoo.org>
Reviewed-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/user.eclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/eclass/user.eclass b/eclass/user.eclass
index b70698356a3..abbbb661b4b 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -13,6 +13,19 @@
 if [[ -z ${_USER_ECLASS} ]]; then
 _USER_ECLASS=1
 
+case ${EAPI:-0} in
+       0|1|2|3|4|5|6|7) ;;
+       *)
+               if [[ ${CATEGORY} != acct-* ]]; then
+                       eerror "In EAPI ${EAPI}, packages must not inherit 
user.eclass"
+                       eerror "unless they are in the acct-user or acct-group 
category."
+                       eerror "Migrate your package to GLEP 81 user/group 
management,"
+                       eerror "or inherit user-info if you need only the query 
functions."
+                       die "Invalid \"inherit user\" in EAPI ${EAPI}"
+               fi
+               ;;
+esac
+
 inherit user-info
 
 # @FUNCTION: _assert_pkg_ebuild_phase

Reply via email to