diff options
author | Göktürk Yüksek <gokturk@gentoo.org> | 2016-10-25 18:30:59 -0400 |
---|---|---|
committer | Göktürk Yüksek <gokturk@gentoo.org> | 2016-10-25 18:30:59 -0400 |
commit | 1d5e96b5ef5eb637ea7aaa477eaeca56fad9a4fe (patch) | |
tree | 2afef5509beabd63a4afa36d491025cb706c7490 | |
parent | ebuild-writing/variables: add brief explanations for EPREFIX, ED, EROOT (diff) | |
download | devmanual-1d5e96b5ef5eb637ea7aaa477eaeca56fad9a4fe.tar.gz devmanual-1d5e96b5ef5eb637ea7aaa477eaeca56fad9a4fe.tar.bz2 devmanual-1d5e96b5ef5eb637ea7aaa477eaeca56fad9a4fe.zip |
ebuild-writing/variables: move the trailing slash issue to a separate section
The ROOT section talks about using ${ROOT%/}/ notation to accommodate
for the upcoming EAPI. The variables D, ED, and EROOT also end in a
trailing slash. Create a separate section to talk about this issue.
Suggested-By: David Seifert <soap@gentoo.org>
-rw-r--r-- | ebuild-writing/variables/text.xml | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/ebuild-writing/variables/text.xml b/ebuild-writing/variables/text.xml index eb8770d..f402070 100644 --- a/ebuild-writing/variables/text.xml +++ b/ebuild-writing/variables/text.xml @@ -457,19 +457,8 @@ pkg_postinst() { fi } </codesample> - -The <c>ROOT</c> variable always ends in a trailing slash. Therefore, -there is no need to suffix it with <c>/</c> when joining paths. </p> -<note> -Future EAPI may remove the trailing slash at the end per -<uri link="https://bugs.gentoo.org/465772">Bug 465722</uri>. -Developers can use <c>${ROOT%/}</c> to ensure maximum compatibility -with both the current and the future EAPI. -</note> - - </body> </section> @@ -565,5 +554,28 @@ follows. </body> </section> +<section> +<title>Trailing Slashes in Variables</title> +<body> + +<p> +The following variables always end in a trailing slash by default: +<c>D</c>, <c>ED</c>, <c>ROOT</c>, <c>EROOT</c>. Therefore, there is no +need to suffix them with <c>/</c> when joining paths. +</p> + +<note> +Future EAPI may remove the trailing slash at the end per +<uri link="https://bugs.gentoo.org/465772">Bug 465722</uri>. +To ease the transition, and ensure maximum compatibility with both the +current and the future EAPI, developers are encouraged to use the bash +suffix removal for the trailing slash and add an explicit <c>/</c> +when joining paths. For example: <c>${D%/}/</c>, <c>${ED%/}/</c>, +<c>${ROOT%/}/</c>, <c>${EROOT%/}/</c>. +</note> + +</body> +</section> + </chapter> </guide> |