Skip to contentSkip to conversation

aufs-utils: Replace install paths with appropriate bitbake environment

meta-filesystem Amarnath Valluri 1 participant 2 messages Feb 8, 2017 – Feb 22, 2017

lore
Share & tools
lore
#0 lore raw

autf-utils Makefile is using hardcoded /bin, /sbin paths, instead we should respect the bitbake environment. This change makes the recipe portable to environments where ${base_bindir} != /bin or ${base_sbindir} != /sbin.

---
 meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb | 7 +++++++
 1 file changed, 7 insertions(+)
meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb +7 -0
index 8980980..3d59e50 100644
@@ -18,6 +18,13 @@ PV = "3.14+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
+do_configure_prepend() {
+   # Replace sbin,bin paths with bitbake environment
+   sed -i -e 's;install_sbin: Tgt = ${DESTDIR}/sbin;install_sbin: Tgt = ${DESTDIR}/${base_sbindir};' \
+          -e 's;install_ubin: Tgt = ${DESTDIR}/usr/sbin;install_sbin: Tgt = ${DESTDIR}/${bindir};' \
+	  ${S}/Makefile
+}
+
 do_configure_append () {
     install -d ${S}/include/linux/
     cp ${WORKDIR}/aufs_type.h ${S}/include/linux/
Signature · 1 line
2.7.4
#1 lore raw

ping - reminder request for feedback

Quoted 27 lines · Amarnath Valluri

autf-utils Makefile is using hardcoded /bin, /sbin paths, instead we should respect the bitbake environment. This change makes the recipe portable to environments where ${base_bindir} != /bin or ${base_sbindir} != /sbin.

---
  meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb | 7 +++++++
  1 file changed, 7 insertions(+)
meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb +7 -0
index 8980980..3d59e50 100644
@@ -18,6 +18,13 @@ PV = "3.14+git${SRCPV}"
 
  S = "${WORKDIR}/git"
 
+do_configure_prepend() {
+   # Replace sbin,bin paths with bitbake environment
+   sed -i -e 's;install_sbin: Tgt = ${DESTDIR}/sbin;install_sbin: Tgt = ${DESTDIR}/${base_sbindir};' \
+          -e 's;install_ubin: Tgt = ${DESTDIR}/usr/sbin;install_sbin: Tgt = ${DESTDIR}/${bindir};' \
+	  ${S}/Makefile
+}
+
  do_configure_append () {
      install -d ${S}/include/linux/
      cp ${WORKDIR}/aufs_type.h ${S}/include/linux/