Gentoo Archives: gentoo-dev

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