From 51ff7e4550e6b502c1a3adbf5c21d3a2206ab889 Mon Sep 17 00:00:00 2001 From: Hiago De Franco Date: Thu, 14 Mar 2024 17:21:56 -0300 Subject: gpio-tool: Use ROOT_HOME instead of hardcoded '/home/root' Hardcoding the root home directory could cause issues when the ROOT_HOME is not set to '/home/root'. As example, the ROOT_HOME can be changed to '/root', which makes gpio-tool install files in the wrong folder. Therefore, replace '/home/root' with '$ROOT_HOME'. Usually, ROOT_HOME is already set to '/home/root' [1]. [1] https://docs.yoctoproject.org/4.3.3/ref-manual/variables.html?highlight=variables#term-ROOT_HOME Related-to: ELB-5646 Signed-off-by: Hiago De Franco --- recipes-support/gpio-tool/gpio-tool.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-support/gpio-tool/gpio-tool.bb b/recipes-support/gpio-tool/gpio-tool.bb index 45181a8..52d2477 100644 --- a/recipes-support/gpio-tool/gpio-tool.bb +++ b/recipes-support/gpio-tool/gpio-tool.bb @@ -24,9 +24,9 @@ do_install() { install -d ${D}/${bindir} install -d ${D}/${datadir}/applications install -d ${D}/${datadir}/pixmaps - install -d ${D}/home/root/Desktop + install -d ${D}${ROOT_HOME}/Desktop install -m 755 ${WORKDIR}/gpio-tool ${D}/${bindir}/ install -m 644 ${WORKDIR}/gpio-tool.desktop ${D}/${datadir}/applications/ install -m 644 ${WORKDIR}/gpio-tool.png ${D}/${datadir}/pixmaps/ - ln -s ${datadir}/applications/gpio-tool.desktop ${D}/home/root/Desktop/ + ln -s ${datadir}/applications/gpio-tool.desktop ${D}${ROOT_HOME}/Desktop/ } -- cgit v1.2.3