commit:     22e517a342ebf782fdb39afb4c7da23f6a9b4413
Author:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 28 15:10:46 2019 +0000
Commit:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Thu Nov 28 15:15:37 2019 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=22e517a3

ebuild-writing/variables: fix the trailing slash in ROOT for EAPI7

Before EAPI7, ROOT was guaranteed to end with a trailing slash. EAPI7
reversed this. Add back trailing slashes to ROOT in the example.

Reported-by: Conrad Kostecki <conrad <AT> kostecki.com>
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>

 ebuild-writing/variables/text.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ebuild-writing/variables/text.xml 
b/ebuild-writing/variables/text.xml
index 35dc8f2..ffd2597 100644
--- a/ebuild-writing/variables/text.xml
+++ b/ebuild-writing/variables/text.xml
@@ -534,11 +534,11 @@ old and obsolete configuration file still exists:
 
 <codesample lang="ebuild">
 pkg_postinst() {
-       if [[ -e "${ROOT}etc/oldconfig" ]]; then
+       if [[ -e "${ROOT}/etc/oldconfig" ]]; then
                ewarn "You still have the obsolete config file "
-               ewarn "    ${ROOT}etc/oldconfig."
-               ewarn "Please migrate your settings to ${ROOT}etc/newconfig"
-               ewarn "and remove ${ROOT}etc/oldconfig."
+               ewarn "    ${ROOT}/etc/oldconfig."
+               ewarn "Please migrate your settings to ${ROOT}/etc/newconfig"
+               ewarn "and remove ${ROOT}/etc/oldconfig."
        fi
 }
 </codesample>

Reply via email to