mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
udev.eclass: add udev_hwdb_update function
update the udev hardware database binary using the `systemd-hwdb update`
command. The `udevadm hwdb` has been deprecated upstream.
See-also: f8717d2a72
Signed-off-by: Lukas Schmelting <lschmelting@posteo.com>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
This commit is contained in:
committed by
Mike Gilbert
parent
6d460e1406
commit
564d70f50a
@@ -130,3 +130,18 @@ udev_reload() {
|
||||
}
|
||||
|
||||
fi
|
||||
|
||||
# @FUNCTION: udev_hwdb_update
|
||||
# @DESCRIPTION:
|
||||
# Rebuild the systemd hwdb binary database used by udev for hardware
|
||||
# property lookups. Should be called from pkg_postinst and pkg_postrm
|
||||
# in packages installing hwdb files.
|
||||
udev_hwdb_update() {
|
||||
if [[ -n ${ROOT} ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Running systemd-hwdb update to regenerate binary udev hardware database"
|
||||
systemd-hwdb update --root "${ROOT}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user