public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Ebuild Readability Issues
@ 2002-12-02 11:23 Rafael Cordones Marcos
  2002-12-02 12:06 ` Johannes Ballé
  0 siblings, 1 reply; 7+ messages in thread
From: Rafael Cordones Marcos @ 2002-12-02 11:23 UTC (permalink / raw
  To: Gentoo GNU/Linux Developers List

Hi,

I am new in writting ebuilds and in the process of writting the first
one I found that the variables used have quite cryptic names: P, S, PV,
PVR, ...

Wouldn't it be better to have also a longer name like:

PACKAGE_SOURCEDIR == S
PACKAGE_ROOTDIR = D
PACKAGE_WORKINGDIR = WORKDIR
PACKAGE_FULL_NAME = P
PACKAGE_NAME = PN
PACKAGE_VERSION = PV
PACKAGE_VERSION_SUFFIX: I have not found an equivalent existing
variable!

PACKAGE_GENTOO_REVISION == PR

I have tracked down where in portage these variables are set and I think
is in /usr/lib/python2.2/site-packages/portage.py
We could add the above mentioned new variables to the "settings" array:

<python-code>
settings["PACKAGE_SOURCEDIR"] = settings["S"]
settings["PACKAGE_ROOTDIR"] = settings["D"]
settings["PACKAGE_FULL_NAME"] = settings["P"]
settings["PACKAGE_NAME"] = settings["PN"]
settings["PACKAGE_VERSION"] = settings["PV"]
settings["PACKAGE_VERSION_SUFFIX"] = ?
settings["PACKAGE_GENTOO_REVISION"] = settings["PR"]
</python-code>

I can take care of creating the patches for portage.py and the
documentation in http://www.gentoo.org/doc/en/gentoo-howto.xml

This changes are backwards compatible with existing ebuilds and will
improve the readability of newly created ones. We should agree on the
anmes though: PACKAGE_SOURCEDIR, PKG_SOURCEDIR, PKG_SOURCE_DIRECTORY?

/Rafa

-- 
Rafael Cordones Marcos
mailto:rcm@sasaska.net
http://sasaska.net

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-12-03 16:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-02 11:23 [gentoo-dev] Ebuild Readability Issues Rafael Cordones Marcos
2002-12-02 12:06 ` Johannes Ballé
2002-12-02 12:04   ` Rafael Cordones Marcos
2002-12-02 13:03     ` foser
2002-12-03 16:54       ` Johannes Ballé
2002-12-02 16:03     ` Mike Frysinger
2002-12-03 13:15       ` Rafael Cordones Marcos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox