From dabb1f76df1fe26cdf1b79d235b4ee3f0a9464cb Mon Sep 17 00:00:00 2001 From: Göktürk Yüksek Date: Thu, 28 Nov 2019 13:28:59 -0500 Subject: ebuild-writing/variables: update the paragraph about trailing slashes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The information dates back to pre-EAPI7 era and incorrectly states that ROOT etc. always end with a trailing slash, which is incorrect with EAPI7. Update the text to reflect both EAPI7 and pre-EAPI7 practices and suggest the bash suffix removal for pre-EAPI7 ebuilds to ease transition. Signed-off-by: Göktürk Yüksek --- ebuild-writing/variables/text.xml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/ebuild-writing/variables/text.xml b/ebuild-writing/variables/text.xml index ffd2597..b6c84f7 100644 --- a/ebuild-writing/variables/text.xml +++ b/ebuild-writing/variables/text.xml @@ -644,21 +644,16 @@ follows.

-The following variables always end in a trailing slash by default: -D, ED, ROOT, EROOT. Therefore, there is no -need to suffix them with / when joining paths. +The following variables never end with a trailing slash in EAPI 7: +D, ED, ROOT, EROOT. Conversely, in EAPIS +preceeding EAPI 7, these variables are guaranteed to end with a +trailing slash. When working with EAPIs prior to EAPI 7, developers +are encouraged to use the bash suffix removal for the trailing slash +and add an explicit / when joining paths. For example: +${D%/}/, ${ED%/}/, ${ROOT%/}/, +${EROOT%/}/.

- -Future EAPI may remove the trailing slash at the end per -Bug 465772. -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 / -when joining paths. For example: ${D%/}/, ${ED%/}/, -${ROOT%/}/, ${EROOT%/}/. - - -- cgit v1.2.3-65-gdbad