Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] systemd: fix udev-hwdb warning
@ 2018-01-04  7:06 mingli.yu
  0 siblings, 0 replies; only message in thread
From: mingli.yu @ 2018-01-04  7:06 UTC (permalink / raw)
  To: openembedded-core

From: Mingli Yu <Mingli.Yu@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@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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-04  7:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04  7:06 [PATCH] systemd: fix udev-hwdb warning mingli.yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox