mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
udev-hwdb: fix postinstall scripts failures when multilib enabled
When multilib is enabled and both udev-hwdb and ${MLPREFIX}udev-hwdb are
installed to image, it fails to run one of their postinstall scripts
that they both call ${base_bindir}/udevadm with same user mode qemu.
Duplicate udevadm and add postinst-intercept update_udev_hwdb to fix the
failures.
(From OE-Core rev: d6b737a31a8842cdc770b05e28503c81a691d10d)
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -282,6 +282,10 @@ do_install() {
|
|||||||
rm -f ${D}${sysconfdir}/systemd/logind.conf
|
rm -f ${D}${sysconfdir}/systemd/logind.conf
|
||||||
rm -f ${D}${sysconfdir}/systemd/system.conf
|
rm -f ${D}${sysconfdir}/systemd/system.conf
|
||||||
rm -f ${D}${sysconfdir}/systemd/user.conf
|
rm -f ${D}${sysconfdir}/systemd/user.conf
|
||||||
|
|
||||||
|
# duplicate udevadm for postinst script
|
||||||
|
install -d ${D}${libexecdir}
|
||||||
|
ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -532,6 +536,7 @@ FILES_udev += "${base_sbindir}/udevd \
|
|||||||
${systemd_unitdir}/system/*udev* \
|
${systemd_unitdir}/system/*udev* \
|
||||||
${systemd_unitdir}/system/*.wants/*udev* \
|
${systemd_unitdir}/system/*.wants/*udev* \
|
||||||
${base_bindir}/udevadm \
|
${base_bindir}/udevadm \
|
||||||
|
${libexecdir}/${MLPREFIX}udevadm \
|
||||||
${datadir}/bash-completion/completions/udevadm \
|
${datadir}/bash-completion/completions/udevadm \
|
||||||
"
|
"
|
||||||
|
|
||||||
@@ -570,13 +575,7 @@ pkg_prerm_${PN} () {
|
|||||||
PACKAGE_WRITE_DEPS += "qemu-native"
|
PACKAGE_WRITE_DEPS += "qemu-native"
|
||||||
pkg_postinst_udev-hwdb () {
|
pkg_postinst_udev-hwdb () {
|
||||||
if test -n "$D"; then
|
if test -n "$D"; then
|
||||||
if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true','false', d)}; then
|
$INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX}
|
||||||
${@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
|
else
|
||||||
udevadm hwdb --update
|
udevadm hwdb --update
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ do_install_append() {
|
|||||||
|
|
||||||
# hid2hci has moved to bluez4. removed in udev as of version 169
|
# hid2hci has moved to bluez4. removed in udev as of version 169
|
||||||
rm -f ${D}${base_libdir}/udev/hid2hci
|
rm -f ${D}${base_libdir}/udev/hid2hci
|
||||||
|
|
||||||
|
# duplicate udevadm for postinst script
|
||||||
|
install -d ${D}${libexecdir}
|
||||||
|
ln ${D}${bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_prepend_class-target () {
|
do_install_prepend_class-target () {
|
||||||
@@ -81,12 +85,7 @@ RPROVIDES_eudev-hwdb += "udev-hwdb"
|
|||||||
PACKAGE_WRITE_DEPS += "qemu-native"
|
PACKAGE_WRITE_DEPS += "qemu-native"
|
||||||
pkg_postinst_eudev-hwdb () {
|
pkg_postinst_eudev-hwdb () {
|
||||||
if test -n "$D"; then
|
if test -n "$D"; then
|
||||||
if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true','false', d)}; then
|
$INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX}
|
||||||
${@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
|
else
|
||||||
udevadm hwdb --update
|
udevadm hwdb --update
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D
|
||||||
|
chown root:root $D${sysconfdir}/udev/hwdb.bin
|
||||||
Reference in New Issue
Block a user