diff options
-rw-r--r-- | meta/recipes-core/systemd/systemd_244.3.bb | 10 | ||||
-rw-r--r-- | scripts/postinst-intercepts/update_udev_hwdb | 16 |
2 files changed, 18 insertions, 8 deletions
diff --git a/meta/recipes-core/systemd/systemd_244.3.bb b/meta/recipes-core/systemd/systemd_244.3.bb index 1595198f53..b11321f87c 100644 --- a/meta/recipes-core/systemd/systemd_244.3.bb +++ b/meta/recipes-core/systemd/systemd_244.3.bb @@ -295,10 +295,6 @@ do_install() { # install default policy for presets # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset - - # We use package postinsts for the hwdb update, as the update service is - # easily triggered for no reason and will slow down boots. - find ${D} -name systemd-hwdb-update.service -delete } python populate_packages_prepend (){ @@ -638,7 +634,9 @@ FILES_udev += "${base_sbindir}/udevd \ ${datadir}/bash-completion/completions/udevadm \ " -FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" +FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \ + ${systemd_unitdir}/system/systemd-hwdb-update.service \ + " RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}" @@ -698,7 +696,7 @@ pkg_prerm_${PN}_libc-glibc () { PACKAGE_WRITE_DEPS += "qemu-native" pkg_postinst_udev-hwdb () { if test -n "$D"; then - $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} + $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}" else udevadm hwdb --update fi diff --git a/scripts/postinst-intercepts/update_udev_hwdb b/scripts/postinst-intercepts/update_udev_hwdb index c4fb2bffcb..102e99b947 100644 --- a/scripts/postinst-intercepts/update_udev_hwdb +++ b/scripts/postinst-intercepts/update_udev_hwdb @@ -5,5 +5,17 @@ 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 +case "${PREFERRED_PROVIDER_udev}" in + systemd) + UDEV_EXTRA_ARGS="--usr" + UDEVLIBDIR="${rootlibexecdir}" + ;; + + *) + UDEV_EXTRA_ARGS="" + UDEVLIBDIR="${sysconfdir}" + ;; +esac + +PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS} +chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin |