Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] What to do with people who use internal eclass functions?
Date: Mon, 26 Aug 2013 10:28:41
Message-Id: CAGfcS_naCY6Y1HzH=3=0OQgYaqBPj10iLkgZo=u4J72_w4EqWg@mail.gmail.com
In Reply to: [gentoo-dev] What to do with people who use internal eclass functions? by "Michał Górny"
1 On Mon, Aug 26, 2013 at 3:38 AM, Michał Górny <mgorny@g.o> wrote:
2 > I've noticed that some people are using internal eclass functions
3 > in their ebuilds. I mean, functions that are explicitly marked
4 > @INTERNAL and that start with an underscore. What should I do to them?
5
6 Seems crazy to need a written policy to not do something so dumb...
7
8 > What should I do now? Mask the ebuild? Proceed with changing
9 > the function and break it?
10
11 Seems like masking and changing is the most appropriate course of
12 action. By all means log a bug and give the maintainer a week or
13 whatever.
14
15 The only exception I'd make would be for important packages. I
16 wouldn't make it because their maintainers are important, but because
17 we care about our users. Obviously we can't go masking bash or
18 whatever.
19
20 However, we should in general consider the use of internal functions a
21 QA issue, and follow-up with the devs doing so. Maybe burning at the
22 stake is a bit harsh since the issue hasn't come up before, but there
23 is no excuse for this.
24
25 >
26 > Or maybe do we need to have GPG signature verification of bash
27 > tracebacks in every internal function to prevent developers from using
28 > those?
29
30 This is not a technical problem, it is a people problem. If any
31 internal functions lack underscores or are referenced in the
32 devmanual/etc those should be fixed, and /maybe/ a repoman warning
33 would be helpful (really? a developer might not realize they've used
34 an undocumented internal function?).
35
36 Sure, maybe some of those internal functions are useful and should
37 turn into published APIs. Devs are welcome to step up and do just
38 that if it makes sense (and following the normal eclass process).
39 However, devs are not welcome to just use internal APIs and then make
40 users deal with the aftermath when ebuilds break. Using internal APIs
41 is bad practice - if anybody doesn't already understand why they're
42 probably on the wrong list.
43
44 Rich