summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2018-06-11 16:38:19 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-18 10:59:33 +0100
commitf3247720dc4b1c49e8fad734e20b17ba55843b97 (patch)
tree8a5f57e24069359746bb49c3ba234755eaf6a71d /meta/recipes-core/udev
parentcca3c084b6c9bf600d7306e3fe12c4f236b78656 (diff)
downloadopenembedded-core-contrib-f3247720dc4b1c49e8fad734e20b17ba55843b97.tar.gz
openembedded-core-contrib-f3247720dc4b1c49e8fad734e20b17ba55843b97.tar.bz2
openembedded-core-contrib-f3247720dc4b1c49e8fad734e20b17ba55843b97.zip
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. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/udev')
-rw-r--r--meta/recipes-core/udev/eudev_3.2.5.bb8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/recipes-core/udev/eudev_3.2.5.bb b/meta/recipes-core/udev/eudev_3.2.5.bb
index 88ad8f1b37..75617c8d4e 100644
--- a/meta/recipes-core/udev/eudev_3.2.5.bb
+++ b/meta/recipes-core/udev/eudev_3.2.5.bb
@@ -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