From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 3/6] udev: only run qemu from postinst scripts if qemu usermode is supported
Date: Mon, 11 Jun 2018 16:38:19 +0300 [thread overview]
Message-ID: <20180611133822.32004-3-alexander.kanavin@linux.intel.com> (raw)
In-Reply-To: <20180611133822.32004-1-alexander.kanavin@linux.intel.com>
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>
---
meta/recipes-core/systemd/systemd_237.bb | 10 +++++++---
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 2e6558ded13..22058e9bf6b 100644
--- a/meta/recipes-core/systemd/systemd_237.bb
+++ b/meta/recipes-core/systemd/systemd_237.bb
@@ -582,9 +582,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
diff --git a/meta/recipes-core/udev/eudev_3.2.5.bb b/meta/recipes-core/udev/eudev_3.2.5.bb
index 88ad8f1b375..75617c8d4ec 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
--
2.17.0
next prev parent reply other threads:[~2018-06-11 13:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-11 13:38 [PATCH 1/6] gtk-immodules-cache.bbclass: convert cache creation to postinst_intercept mechanism Alexander Kanavin
2018-06-11 13:38 ` [PATCH 2/6] lib/oe/package_manager: turn postinst failure warnings into bitbake failures Alexander Kanavin
2018-06-17 7:35 ` Richard Purdie
2018-06-11 13:38 ` Alexander Kanavin [this message]
2018-06-11 13:38 ` [PATCH 4/6] qemuwrapper-cross: enable multilib and nativesdk variants of the script Alexander Kanavin
2018-06-11 13:38 ` [PATCH 5/6] image.bbclass, populate_sdk_base.bbclass: make all variants of qemuwrapper-cross available in sysroots Alexander Kanavin
2018-06-11 13:38 ` [PATCH 6/6] package_manager.py: rework postinst_intercept failures Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180611133822.32004-3-alexander.kanavin@linux.intel.com \
--to=alexander.kanavin@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox