From: | Ulrich Mueller <ulm@g.o> |
---|---|
To: | gentoo-dev@l.g.o |
Subject: | [gentoo-dev] Standardise the variable for including eclasses only once |
Date: | Fri, 04 Jul 2014 09:26:12 |
Message-Id: | 21430.29481.773070.678302@a1i15.kph.uni-mainz.de |
1 | Hi all, |
2 | Several of our eclasses use a mechanism that prevents them from being |
3 | inherited more than once. Some eclasses test for a special value [1]: |
4 | |
5 | ___ECLASS_ONCE_EUTILS="recur -_+^+_- spank" |
6 | |
7 | while others simply assign 1 and test for a non-empty variable [2]: |
8 | |
9 | _GIT_R3=1 |
10 | |
11 | The problem with the name of the former variable is that function and |
12 | variable names starting with __ (two underscores) are reserved for |
13 | package manager use [3], so the variable should be renamed. We can |
14 | take this as an occasion to standardise the variable's name and value. |
15 | |
16 | Since names like _USER or _PAM look a little dangerous, I suggest |
17 | _<eclassname>_ECLASS for the variable's name. |
18 | |
19 | I have no strong preference for the variable's value. Is testing for |
20 | a non-empty value sufficient? Then we should assign something simple |
21 | (like "1"). If not, any string that is sufficiently random (like the |
22 | one used in eutils) should be good. |
23 | |
24 | Ulrich |
25 | |
26 | |
27 | [1] http://thread.gmane.org/gmane.linux.gentoo.devel/74303/focus=74305 |
28 | [2] http://thread.gmane.org/gmane.linux.gentoo.devel/87922/focus=87928 |
29 | [3] http://dev.gentoo.org/~ulm/pms/5/pms.html#x1-14300011.3.3.15 |
Subject | Author |
---|---|
Re: [gentoo-dev] Standardise the variable for including eclasses only once | "Michał Górny" <mgorny@g.o> |
[gentoo-dev] Re: Standardise the variable for including eclasses only once | Michael Palimaka <kensington@g.o> |