1 |
Hi, |
2 |
|
3 |
I am new in writting ebuilds and in the process of writting the first |
4 |
one I found that the variables used have quite cryptic names: P, S, PV, |
5 |
PVR, ... |
6 |
|
7 |
Wouldn't it be better to have also a longer name like: |
8 |
|
9 |
PACKAGE_SOURCEDIR == S |
10 |
PACKAGE_ROOTDIR = D |
11 |
PACKAGE_WORKINGDIR = WORKDIR |
12 |
PACKAGE_FULL_NAME = P |
13 |
PACKAGE_NAME = PN |
14 |
PACKAGE_VERSION = PV |
15 |
PACKAGE_VERSION_SUFFIX: I have not found an equivalent existing |
16 |
variable! |
17 |
|
18 |
PACKAGE_GENTOO_REVISION == PR |
19 |
|
20 |
I have tracked down where in portage these variables are set and I think |
21 |
is in /usr/lib/python2.2/site-packages/portage.py |
22 |
We could add the above mentioned new variables to the "settings" array: |
23 |
|
24 |
<python-code> |
25 |
settings["PACKAGE_SOURCEDIR"] = settings["S"] |
26 |
settings["PACKAGE_ROOTDIR"] = settings["D"] |
27 |
settings["PACKAGE_FULL_NAME"] = settings["P"] |
28 |
settings["PACKAGE_NAME"] = settings["PN"] |
29 |
settings["PACKAGE_VERSION"] = settings["PV"] |
30 |
settings["PACKAGE_VERSION_SUFFIX"] = ? |
31 |
settings["PACKAGE_GENTOO_REVISION"] = settings["PR"] |
32 |
</python-code> |
33 |
|
34 |
I can take care of creating the patches for portage.py and the |
35 |
documentation in http://www.gentoo.org/doc/en/gentoo-howto.xml |
36 |
|
37 |
This changes are backwards compatible with existing ebuilds and will |
38 |
improve the readability of newly created ones. We should agree on the |
39 |
anmes though: PACKAGE_SOURCEDIR, PKG_SOURCEDIR, PKG_SOURCE_DIRECTORY? |
40 |
|
41 |
/Rafa |
42 |
|
43 |
-- |
44 |
Rafael Cordones Marcos |
45 |
mailto:rcm@×××××××.net |
46 |
http://sasaska.net |
47 |
|
48 |
-- |
49 |
gentoo-dev@g.o mailing list |