[OE-core] [PATCH v2 2/4] systemd: verify if files test-udev and systemd-journal-flush exists
Bruno Bottazzini
bruno.bottazzini at intel.com
Mon Mar 9 21:10:51 UTC 2015
If we compile using EXTRA_OECONF with '--disable-tests' option, the files
test-udev and systemd-journal-flush will not be created and the systemd
install phase will fail.
---
meta/recipes-core/systemd/systemd_219.bb | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
index 24486f1..6a8b5b8 100644
--- a/meta/recipes-core/systemd/systemd_219.bb
+++ b/meta/recipes-core/systemd/systemd_219.bb
@@ -166,7 +166,9 @@ do_install() {
sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
# its needed in 216 upstream has fixed it with 919699ec301ea507edce4a619141ed22e789ac0d
# don't order journal flushing afte remote-fs.target
- sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service
+ if [ -s ${D}${systemd_unitdir}/system/systemd-journal-flush.service ]; then
+ sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service
+ fi
# this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
# for existence else it fails
if [ -s ${D}${libdir}/tmpfiles.d/systemd.conf ]; then
@@ -177,7 +179,9 @@ do_install() {
do_install_ptest () {
install -d ${D}${PTEST_PATH}/test
cp -rf ${S}/test/* ${D}${PTEST_PATH}/test
- install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/
+ if [ -s ${B}/test-udev ]; then
+ install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/
+ fi
install -d ${D}${PTEST_PATH}/build-aux
cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
cp -rf ${B}/rules ${D}${PTEST_PATH}/
--
1.9.1
More information about the Openembedded-core
mailing list