Skip to contentSkip to conversation

systemd: fix udev-hwdb warning

PATCH New [email protected] 1 participant 1 message Jan 4, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd: fix udev-hwdb warning

From: Mingli Yu <[email protected]>

* 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

---
 meta/recipes-core/systemd/systemd_234.bb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
meta/recipes-core/systemd/systemd_234.bb +6 -2
index 9a10a31881..64596b7563 100644
@@ -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
Signature · 1 line
2.11.0