[OE-core] [PATCH] systemd: fix udev-hwdb warning
mingli.yu at windriver.com
mingli.yu at windriver.com
Thu Jan 4 07:06:16 UTC 2018
From: Mingli Yu <Mingli.Yu at windriver.com>
* Add qemu usermode checking for udev-hwdb as
udev-hwdb uses quemu usermode by default, but
some architecture such as Intel skylake doesn't
support qemu usermode and can result a build
warning as below:
| warning: %post(udev-hwdb-1:234-r0.skylake_64) scriptlet failed, exit status 1
Signed-off-by: Mingli Yu <Mingli.Yu at windriver.com>
---
meta/recipes-core/systemd/systemd_234.bb | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_234.bb b/meta/recipes-core/systemd/systemd_234.bb
index 9a10a31881..64596b7563 100644
--- a/meta/recipes-core/systemd/systemd_234.bb
+++ b/meta/recipes-core/systemd/systemd_234.bb
@@ -619,9 +619,13 @@ pkg_prerm_${PN} () {
PACKAGE_WRITE_DEPS += "qemu-native"
pkg_postinst_udev-hwdb () {
if test -n "$D"; then
- ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
+ if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true','false', d)}; then
+ ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
--root $D
- chown root:root $D${sysconfdir}/udev/hwdb.bin
+ chown root:root $D${sysconfdir}/udev/hwdb.bin
+ else
+ exit 1
+ fi
else
udevadm hwdb --update
fi
--
2.11.0
More information about the Openembedded-core
mailing list