diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2018-06-11 16:38:19 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-18 11:07:58 +0100 |
commit | e67551e80e100913f59f3f9c8071ca451be02289 (patch) | |
tree | 98f8c7813367e739f9151740e35ca03fb89ada22 | |
parent | 4f3b7477a38f271a23db4d57c7444dc615a00716 (diff) | |
download | poky-e67551e80e100913f59f3f9c8071ca451be02289.tar.gz |
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>
-rw-r--r-- | meta/recipes-core/systemd/systemd_237.bb | 10 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev_3.2.5.bb | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/meta/recipes-core/systemd/systemd_237.bb b/meta/recipes-core/systemd/systemd_237.bb index 47d28902c8..e4846fe4f6 100644 --- a/meta/recipes-core/systemd/systemd_237.bb +++ b/meta/recipes-core/systemd/systemd_237.bb | |||
@@ -584,9 +584,13 @@ pkg_prerm_${PN} () { | |||
584 | PACKAGE_WRITE_DEPS += "qemu-native" | 584 | PACKAGE_WRITE_DEPS += "qemu-native" |
585 | pkg_postinst_udev-hwdb () { | 585 | pkg_postinst_udev-hwdb () { |
586 | if test -n "$D"; then | 586 | if test -n "$D"; then |
587 | ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ | 587 | if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true','false', d)}; then |
588 | --root $D | 588 | ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ |
589 | chown root:root $D${sysconfdir}/udev/hwdb.bin | 589 | --root $D |
590 | chown root:root $D${sysconfdir}/udev/hwdb.bin | ||
591 | else | ||
592 | $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX} | ||
593 | fi | ||
590 | else | 594 | else |
591 | udevadm hwdb --update | 595 | udevadm hwdb --update |
592 | fi | 596 | fi |
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" | |||
80 | PACKAGE_WRITE_DEPS += "qemu-native" | 80 | PACKAGE_WRITE_DEPS += "qemu-native" |
81 | pkg_postinst_eudev-hwdb () { | 81 | pkg_postinst_eudev-hwdb () { |
82 | if test -n "$D"; then | 82 | if test -n "$D"; then |
83 | ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D | 83 | if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true','false', d)}; then |
84 | chown root:root $D${sysconfdir}/udev/hwdb.bin | 84 | ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D |
85 | chown root:root $D${sysconfdir}/udev/hwdb.bin | ||
86 | else | ||
87 | $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX} | ||
88 | fi | ||
85 | else | 89 | else |
86 | udevadm hwdb --update | 90 | udevadm hwdb --update |
87 | fi | 91 | fi |