Summary: | Ebuild writing style guide GLEP is needed | ||
---|---|---|---|
Product: | Documentation | Reporter: | Eugene Bright <eugene> |
Component: | New GLEP submissions | Assignee: | GLEP Editors <glep> |
Status: | RESOLVED NEEDINFO | ||
Severity: | enhancement | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
URL: | https://github.com/gentoo/gentoo/pull/10192/commits/3f1927d6217366875737a74961b33f53bdaa3bb4 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Eugene Bright
2018-10-28 11:53:54 UTC
<GLEP editor> We don't assign GLEP numbers unless there is a first draft. So please follow the workflow as outlined in GLEP 1: https://www.gentoo.org/glep/glep-0001.html#glep-work-flow </GLEP editor> (Also, the devmanual already addresses line length and whitespace. I doubt that a separate GLEP would be the best format a style guide.) Devmanual should be enough. I just can't find related style guides in it. Could you give me a hint? https://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting-and-whitespace There are also some tacit conventions, like having single lines for things like KEYWORDS, IUSE, and inherit, in order to facilitate grep across the tree. I don't think we've any formal writeup for those, but everyone seems to follow them. Thank you very much. Relying on grep doesn't look a good justification for prohibiting multi-line IUSE. The assumption that IUSE is defined in one line is generally wrong. Moreover writing long lines contradicts with manual recommendations as it's really *possible* to make them readable and short. Why not to use specialized tools like equery for probing for USE flags? As I said, this is currently not an item for the GLEP editors, but should be discussed on the mailing lists. (My personal opinion is that there will be zero chance for changing that long established convention. Feel free to try, though.) $ find /var/db/repos/gentoo -name '*.ebuild' -exec grep '^KEYWORDS=".*"' '{}' + | wc -l 31840 $ find /var/db/repos/gentoo -name '*.ebuild' -exec grep '^KEYWORDS="[^"]*$' '{}' + | wc -l 1 |