@@ -915,12 +915,10 @@ pkg_prerm:${PN}:libc-glibc () {
fi
}
-PACKAGE_WRITE_DEPS += "qemuwrapper-cross"
-
pkg_postinst:udev-hwdb () {
if test -n "$D"; then
- $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} \
- rootlibexecdir="${nonarch_libdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}" base_bindir="${base_bindir}"
+ $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} \
+ PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}"
else
systemd-hwdb update
fi
@@ -7,19 +7,19 @@ set -e
case "${PREFERRED_PROVIDER_udev}" in
systemd)
- UDEV_EXTRA_ARGS="--usr"
- UDEVLIBDIR="${rootlibexecdir}"
- UDEVADM="${base_bindir}/udevadm"
+ echo Updating HWDB with native systemd-hwdb...
+ systemd-hwdb update --root $D --usr
;;
*)
- UDEV_EXTRA_ARGS=""
+ echo Updating HWDB with udevadm...
+
UDEVLIBDIR="${sysconfdir}"
UDEVADM="${bindir}/udevadm"
+
+ rm -f $D${UDEVLIBDIR}/udev/hwdb.bin
+ PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ||
+ PSEUDO_UNLOAD=1 qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D
+ chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin
;;
esac
-
-rm -f $D${UDEVLIBDIR}/udev/hwdb.bin
-PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS} ||
- PSEUDO_UNLOAD=1 qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS}
-chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin
Now that systemd-tools-native gives us a native systemd-hwdb, and the database format is known to be hardware-agnostic, we can simply run systemd-hwdb directly instead of running it inside qemu-user if we're using systemd instead of eudev. Signed-off-by: Ross Burton <ross.burton@arm.com> --- meta/recipes-core/systemd/systemd_259.5.bb | 6 ++---- scripts/postinst-intercepts/update_udev_hwdb | 18 +++++++++--------- 2 files changed, 11 insertions(+), 13 deletions(-)