[PATCH v2 19/25] mdadm: Avoid using hardocded udev, sbin paths

Amarnath Valluri
2017-02-22T08:27:20Z

Use appropriate bitbake variables inplace of below hardcoded locations:
/sbin -> ${base_sbindir}
/lib/udev -> ${nonarch_base_libdir}/udev

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/recipes-extended/mdadm/mdadm_4.0.bb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/mdadm/mdadm_4.0.bb b/meta/recipes-extended/mdadm/mdadm_4.0.bb
index c228899..8a77204 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.0.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.0.bb
@@ -33,7 +33,9 @@ CFLAGS_append_mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__'
CFLAGS_append_mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__'

do_compile() {
- oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
+ # Point to right sbindir
+ sed -i -e 's;BINDIR = /sbin;BINDIR = $base_sbindir;' ${S}/Makefile
+ oe_runmake SYSROOT="${STAGING_DIR_TARGET}" UDEVDIR="${nonarch_libdir}/udev"
}

do_install() {
@@ -51,7 +53,7 @@ do_install_ptest() {
cp -a ${S}/tests ${D}${PTEST_PATH}/tests
cp ${S}/test ${D}${PTEST_PATH}
sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
- ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm
+ ln -s ${base_sbindir}/mdadm ${D}${PTEST_PATH}/mdadm
for prg in test_stripe swap_super raid6check
do
install -D -m 755 $prg ${D}${PTEST_PATH}/
--
2.7.4