Gentoo Archives: gentoo-dev

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH] user.eclass: Deprecate general use for future EAPIs.
Date: Sun, 25 Oct 2020 15:51:48
Message-Id: uimaymhh3@gentoo.org
1 No functional difference for existing EAPIs.
2
3 Reviewed-by: David Seifert <soap@g.o>
4 Reviewed-by: Michał Górny <mgorny@g.o>
5 Reviewed-by: Andreas K. Hüttel <dilfridge@g.o>
6 Signed-off-by: Ulrich Müller <ulm@g.o>
7 ---
8 eclass/user.eclass | 13 +++++++++++++
9 1 file changed, 13 insertions(+)
10
11 diff --git a/eclass/user.eclass b/eclass/user.eclass
12 index b70698356a3a..abbbb661b4bc 100644
13 --- a/eclass/user.eclass
14 +++ b/eclass/user.eclass
15 @@ -13,6 +13,19 @@
16 if [[ -z ${_USER_ECLASS} ]]; then
17 _USER_ECLASS=1
18
19 +case ${EAPI:-0} in
20 + 0|1|2|3|4|5|6|7) ;;
21 + *)
22 + if [[ ${CATEGORY} != acct-* ]]; then
23 + eerror "In EAPI ${EAPI}, packages must not inherit user.eclass"
24 + eerror "unless they are in the acct-user or acct-group category."
25 + eerror "Migrate your package to GLEP 81 user/group management,"
26 + eerror "or inherit user-info if you need only the query functions."
27 + die "Invalid \"inherit user\" in EAPI ${EAPI}"
28 + fi
29 + ;;
30 +esac
31 +
32 inherit user-info
33
34 # @FUNCTION: _assert_pkg_ebuild_phase
35 --
36 2.29.0

Attachments

File name MIME type
signature.asc application/pgp-signature