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() { | |||
| 295 | # install default policy for presets | 295 | # install default policy for presets |
| 296 | # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto | 296 | # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto |
| 297 | install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset | 297 | install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset |
| 298 | |||
| 299 | # We use package postinsts for the hwdb update, as the update service is | ||
| 300 | # easily triggered for no reason and will slow down boots. | ||
| 301 | find ${D} -name systemd-hwdb-update.service -delete | ||
| 302 | } | 298 | } |
| 303 | 299 | ||
| 304 | python populate_packages_prepend (){ | 300 | python populate_packages_prepend (){ |
| @@ -638,7 +634,9 @@ FILES_udev += "${base_sbindir}/udevd \ | |||
| 638 | ${datadir}/bash-completion/completions/udevadm \ | 634 | ${datadir}/bash-completion/completions/udevadm \ |
| 639 | " | 635 | " |
| 640 | 636 | ||
| 641 | FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" | 637 | FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \ |
| 638 | ${systemd_unitdir}/system/systemd-hwdb-update.service \ | ||
| 639 | " | ||
| 642 | 640 | ||
| 643 | RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}" | 641 | RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}" |
| 644 | 642 | ||
| @@ -698,7 +696,7 @@ pkg_prerm_${PN}_libc-glibc () { | |||
| 698 | PACKAGE_WRITE_DEPS += "qemu-native" | 696 | PACKAGE_WRITE_DEPS += "qemu-native" |
| 699 | pkg_postinst_udev-hwdb () { | 697 | pkg_postinst_udev-hwdb () { |
| 700 | if test -n "$D"; then | 698 | if test -n "$D"; then |
| 701 | $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} | 699 | $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}" |
| 702 | else | 700 | else |
| 703 | udevadm hwdb --update | 701 | udevadm hwdb --update |
| 704 | fi | 702 | 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 @@ | |||
| 5 | 5 | ||
| 6 | set -e | 6 | set -e |
| 7 | 7 | ||
| 8 | PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D | 8 | case "${PREFERRED_PROVIDER_udev}" in |
| 9 | chown root:root $D${sysconfdir}/udev/hwdb.bin | 9 | systemd) |
| 10 | UDEV_EXTRA_ARGS="--usr" | ||
| 11 | UDEVLIBDIR="${rootlibexecdir}" | ||
| 12 | ;; | ||
| 13 | |||
| 14 | *) | ||
| 15 | UDEV_EXTRA_ARGS="" | ||
| 16 | UDEVLIBDIR="${sysconfdir}" | ||
| 17 | ;; | ||
| 18 | esac | ||
| 19 | |||
| 20 | PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS} | ||
| 21 | chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin | ||
