1 |
>>>>> On Sun, 10 Jul 2022, Anna wrote: |
2 |
|
3 |
> On 2022-07-09 23:37, Conrad Kostecki wrote: |
4 |
>> I would like to inform you all, that GLEP-81 migration has been |
5 |
>> finally done. All existing packages got migrated and no ones left. |
6 |
|
7 |
Great work, thank you! |
8 |
|
9 |
> What to do with user.eclass now? It's already marked @DEPRECATED, do |
10 |
> we want it @DEAD and eventually removed? |
11 |
|
12 |
The eclass dies in EAPI 8 if called from an ebuild outside the acct-* |
13 |
category. We could extend this to EAPIs 6 and 7 (but it might cause |
14 |
problems for overlays). |
15 |
|
16 |
Also, not sure if the @DEPRECATED tag should be used for an eclass that |
17 |
is still indirectly inherited by other eclasses. |
18 |
|
19 |
How about attached patch? |
20 |
|
21 |
Ulrich |
22 |
|
23 |
|
24 |
From 49006bdb82f321c359dcf8f0f78893ccdf0e6be7 Mon Sep 17 00:00:00 2001 |
25 |
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@g.o> |
26 |
Date: Sun, 10 Jul 2022 09:14:19 +0200 |
27 |
Subject: [PATCH] user.eclass: Warn about eclass usage in all EAPIs |
28 |
MIME-Version: 1.0 |
29 |
Content-Type: text/plain; charset=UTF-8 |
30 |
Content-Transfer-Encoding: 8bit |
31 |
|
32 |
Remove @DEPRECATED tag because this is not a removal candidate. |
33 |
|
34 |
Signed-off-by: Ulrich Müller <ulm@g.o> |
35 |
--- |
36 |
eclass/user.eclass | 24 +++++++++++++----------- |
37 |
1 file changed, 13 insertions(+), 11 deletions(-) |
38 |
|
39 |
diff --git a/eclass/user.eclass b/eclass/user.eclass |
40 |
index d5b827d2e76b..b4f63ffab4a2 100644 |
41 |
--- a/eclass/user.eclass |
42 |
+++ b/eclass/user.eclass |
43 |
@@ -7,25 +7,27 @@ |
44 |
# Michał Górny <mgorny@g.o> (NetBSD) |
45 |
# @SUPPORTED_EAPIS: 6 7 8 |
46 |
# @BLURB: user management in ebuilds |
47 |
-# @DEPRECATED: acct-user/acct-group packages |
48 |
# @DESCRIPTION: |
49 |
# The user eclass contains a suite of functions that allow ebuilds |
50 |
# to quickly make sure users in the installed system are sane. |
51 |
|
52 |
case ${EAPI} in |
53 |
- 6|7) ;; |
54 |
- 8) |
55 |
- if [[ ${CATEGORY} != acct-* ]]; then |
56 |
- eerror "In EAPI ${EAPI}, packages must not inherit user.eclass" |
57 |
- eerror "unless they are in the acct-user or acct-group category." |
58 |
- eerror "Migrate your package to GLEP 81 user/group management," |
59 |
- eerror "or inherit user-info if you need only the query functions." |
60 |
- die "Invalid \"inherit user\" in EAPI ${EAPI}" |
61 |
- fi |
62 |
- ;; |
63 |
+ 6|7|8) ;; |
64 |
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
65 |
esac |
66 |
|
67 |
+if [[ ${CATEGORY} != acct-* ]]; then |
68 |
+ eerror "Packages must not inherit user.eclass unless they are" |
69 |
+ eerror "in the acct-user or acct-group category." |
70 |
+ eerror "Migrate your package to GLEP 81 user/group management," |
71 |
+ eerror "or inherit user-info if you need only the query functions." |
72 |
+ if [[ ${EAPI} != [67] ]]; then |
73 |
+ die "Invalid \"inherit user\"" |
74 |
+ else |
75 |
+ eerror "This message will become fatal in EAPI ${EAPI} on 2023-01-01" |
76 |
+ fi |
77 |
+fi |
78 |
+ |
79 |
if [[ -z ${_USER_ECLASS} ]]; then |
80 |
_USER_ECLASS=1 |
81 |
|
82 |
-- |
83 |
2.35.1 |