1 |
Boris Vinogradov posted on Tue, 27 Nov 2018 21:13:35 +0300 as excerpted: |
2 |
|
3 |
> I use gentoo about 8 year. I already try to write ebuild for my package |
4 |
> but I think it's difficult to everyone who do it in the first time. |
5 |
> |
6 |
> Because ebuild have strange short name for common portage variable such |
7 |
> as {P}, {PV}, {PN} etc. Another developers use these modified variables |
8 |
> with name and preffix MY, for example {MY_P}, {MY_PV}. I think it isn't |
9 |
> readable because everyone who read and write ebuilds sometime may be |
10 |
> foget their means. |
11 |
> |
12 |
> I propouse to use human readble variable names for portage variables, |
13 |
> such as {PATH} instead {P}, {PACKAGE_N}/{PACKAGE_NAME} instead {PN}, |
14 |
> etc... Human isn't a computer who knowns evething point of |
15 |
> https://devmanual.gentoo.org/ebuild-writing/variables/index.html and |
16 |
> other portage internals. |
17 |
> |
18 |
> I think it's major for everyone gentoo developer because ebuild is face |
19 |
> of portage system and main component of gentoo unique feature. |
20 |
|
21 |
It's worth noting that ebuilds conform to a gentoo common standard called |
22 |
Package Management Specification (PMS), which defines ebuild-critical |
23 |
variable names such as {P}, {PV}, etc, and that there are package |
24 |
managers other than portage which along with portage depend on ebuilds |
25 |
conforming to this standard or they will fail to function correctly. |
26 |
|
27 |
Updates to this standard are usually done via defining new EAPIs, with |
28 |
EAPI=7 being the current latest (tho note that while all officially |
29 |
approved APIs have been sequential numeric, EAPIs are specifically not |
30 |
required to be numeric, a historic experimental EAPI was named 5-hdepend, |
31 |
for instance). Ideas for a new EAPI are proposed and discussed, |
32 |
generally with a preliminary approval by the Gentoo council before |
33 |
implementation in portage (as the defined PM reference implementation), |
34 |
after which a final council approval is required before the new EAPI is |
35 |
allowed to be used in the Gentoo tree. |
36 |
|
37 |
So to propose human-readable standard var names you'd need to propose the |
38 |
change as part of a new EAPI and get it approved as such, but of course |
39 |
the existing EAPIs would remain in use for some time, so developers would |
40 |
continue to need to know the existing EAPI vars until they are fully |
41 |
deprecated and all ebuilds containing them are removed from the tree. |
42 |
|
43 |
And honestly I must say I'm a bit skeptical, in part because in the |
44 |
decade and a half I've been a gentooer (user not dev) myself, I've not |
45 |
seen this sort of proposal before, so I suspect most devs must get |
46 |
comfortable with the existing short vars pretty quickly, and would resent |
47 |
the "churn for no good reason" and consequent relearning a wholesale |
48 |
switch to "human readable" would mean for them. So I doubt its chances |
49 |
at approval... tho I wouldn't really mind being proven wrong on this |
50 |
point if you're up for the longer term drive to approval it'd take, |
51 |
because... |
52 |
|
53 |
As for me personally, as another user, when I'm working on modifying |
54 |
ebuilds and don't remember the specifics of a standard var or function, I |
55 |
open the ebuild (5) manpage in another VT or terminal window, and use it |
56 |
for reference. |
57 |
|
58 |
Another alternative is the app-doc/pms "Gentoo Package Manager |
59 |
Specification" package, which contains the specific standards definitions |
60 |
along with a nicely printable quick-reference card listing which EAPIs |
61 |
define what. I have that installed too, as I suspect most devs and |
62 |
advanced users doing ebuild work do, tho as I mentioned I personally tend |
63 |
to find the ebuild (5) manpage easier for a quick lookup, and only tend |
64 |
to use PMS when I'm checking details not in the ebuild (5) manpage or I |
65 |
need the specific wording of the agreed PMS standard. |
66 |
|
67 |
-- |
68 |
Duncan - List replies preferred. No HTML msgs. |
69 |
"Every nonfree program has a lord, a master -- |
70 |
and if you use the program, he is your master." Richard Stallman |