attr: Strip build host paths and tool versions from ptest files

Using the new PTEST_BUILD_HOST_FILES mechanism.
Specifically remove reference to build host rpm version, if any.

(From OE-Core rev: 2664926ff154aacfb274e3055e81ba41190fa403)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Douglas Royds
2018-11-29 10:13:19 +13:00
committed by Richard Purdie
parent ea9f050cbc
commit 42fedcd96f

View File

@@ -29,6 +29,9 @@ ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_${PN} = "setfattr"
ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr"
PTEST_BUILD_HOST_FILES = "builddefs"
PTEST_BUILD_HOST_PATTERN = "^RPM"
do_install_ptest() {
tar -c --exclude=ext test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
mkdir ${D}${PTEST_PATH}/include
@@ -36,12 +39,6 @@ do_install_ptest() {
do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \
done
sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
# Remove any build host references
sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
-e 's:${HOSTTOOLS_DIR}/::g' \
-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-i ${D}${PTEST_PATH}/include/builddefs
}
RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"