1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

udev: only run qemu from postinst scripts if qemu usermode is supported

Otherwise, there would be a failure at image creation time; avoid
that by postponing to first boot explicitly.

(From OE-Core rev: f3247720dc4b1c49e8fad734e20b17ba55843b97)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2018-06-11 16:38:19 +03:00
committed by Richard Purdie
parent 4f3b7477a3
commit e67551e80e
2 changed files with 13 additions and 5 deletions
+7 -3
View File
@@ -584,9 +584,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 \
--root $D
chown root:root $D${sysconfdir}/udev/hwdb.bin
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
else
$INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
fi
else
udevadm hwdb --update
fi
+6 -2
View File
@@ -80,8 +80,12 @@ RPROVIDES_eudev-hwdb += "udev-hwdb"
PACKAGE_WRITE_DEPS += "qemu-native"
pkg_postinst_eudev-hwdb () {
if test -n "$D"; then
${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D
chown root:root $D${sysconfdir}/udev/hwdb.bin
if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true','false', d)}; then
${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D
chown root:root $D${sysconfdir}/udev/hwdb.bin
else
$INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
fi
else
udevadm hwdb --update
fi