summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiago De Franco <hiago.franco@toradex.com>2024-03-14 17:21:56 -0300
committerHiago De Franco <hiago.franco@toradex.com>2024-03-14 17:47:51 -0300
commit51ff7e4550e6b502c1a3adbf5c21d3a2206ab889 (patch)
tree4c2cd6a557163b7755daf995fbff48b775784913
parent301c4454ec0511a720c6a3d70a81d1617ffbc4fa (diff)
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 <hiago.franco@toradex.com>
-rw-r--r--recipes-support/gpio-tool/gpio-tool.bb4
1 files 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/
}