Gentoo Archives: gentoo-commits

From: "Göktürk Yüksek" <gokturk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/variables/
Date: Thu, 28 Nov 2019 18:32:56
Message-Id: 1574965949.dabb1f76df1fe26cdf1b79d235b4ee3f0a9464cb.gokturk@gentoo
1 commit: dabb1f76df1fe26cdf1b79d235b4ee3f0a9464cb
2 Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 28 18:28:59 2019 +0000
4 Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 28 18:32:29 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=dabb1f76
7
8 ebuild-writing/variables: update the paragraph about trailing slashes
9
10 The information dates back to pre-EAPI7 era and incorrectly states
11 that ROOT etc. always end with a trailing slash, which is incorrect
12 with EAPI7. Update the text to reflect both EAPI7 and pre-EAPI7
13 practices and suggest the bash suffix removal for pre-EAPI7 ebuilds to
14 ease transition.
15
16 Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
17
18 ebuild-writing/variables/text.xml | 21 ++++++++-------------
19 1 file changed, 8 insertions(+), 13 deletions(-)
20
21 diff --git a/ebuild-writing/variables/text.xml b/ebuild-writing/variables/text.xml
22 index ffd2597..b6c84f7 100644
23 --- a/ebuild-writing/variables/text.xml
24 +++ b/ebuild-writing/variables/text.xml
25 @@ -644,21 +644,16 @@ follows.
26 <body>
27
28 <p>
29 -The following variables always end in a trailing slash by default:
30 -<c>D</c>, <c>ED</c>, <c>ROOT</c>, <c>EROOT</c>. Therefore, there is no
31 -need to suffix them with <c>/</c> when joining paths.
32 +The following variables never end with a trailing slash in EAPI 7:
33 +<c>D</c>, <c>ED</c>, <c>ROOT</c>, <c>EROOT</c>. Conversely, in EAPIS
34 +preceeding EAPI 7, these variables are guaranteed to end with a
35 +trailing slash. When working with EAPIs prior to EAPI 7, developers
36 +are encouraged to use the bash suffix removal for the trailing slash
37 +and add an explicit <c>/</c> when joining paths. For example:
38 +<c>${D%/}/</c>, <c>${ED%/}/</c>, <c>${ROOT%/}/</c>,
39 +<c>${EROOT%/}/</c>.
40 </p>
41
42 -<note>
43 -Future EAPI may remove the trailing slash at the end per
44 -<uri link="https://bugs.gentoo.org/465772">Bug 465772</uri>.
45 -To ease the transition, and ensure maximum compatibility with both the
46 -current and the future EAPI, developers are encouraged to use the bash
47 -suffix removal for the trailing slash and add an explicit <c>/</c>
48 -when joining paths. For example: <c>${D%/}/</c>, <c>${ED%/}/</c>,
49 -<c>${ROOT%/}/</c>, <c>${EROOT%/}/</c>.
50 -</note>
51 -
52 </body>
53 </section>