Re: [PATCH 2/3] udev.eclass: add udev_hwdb_update function
Lukas Schmelting <[email protected]>
| Newsgroups | gmane.linux.gentoo.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mi, Apr 29, 2026 at 02:32 Mike Gilbert <[email protected]> wrote: > On Wed, Apr 29, 2026 at 1:51 PM Lukas Schmelting <[email protected]> wrote: >> >> update the udev hardware database binary using the `systemd-hwdb update` >> command. The `udevadm hwdb` has been deprecated upstream. >> >> See-also: https://github.com/systemd/systemd/commit/f8717d2a723cf594617c3acb7e90992c881a3280 >> Signed-off-by: Lukas Schmelting <[email protected]> >> --- >> eclass/udev.eclass | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/eclass/udev.eclass b/eclass/udev.eclass >> index 7d1c213fa643..afdf7c91c7a9 100644 >> --- a/eclass/udev.eclass >> +++ b/eclass/udev.eclass >> @@ -130,3 +130,19 @@ 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 $? >> +} >> -- >> 2.53.0 > > I pushed the udev.eclass patch along with a follow-up fix. Thanks! -- Best regards Lukas Schmelting (eluks)
signature.asc
(application/pgp-signature, 296 B)
-----BEGIN PGP SIGNATURE----- iKkEARYKAFEWIQRudoGMjfogoVqpbboi9Ak2YThtrQUCafJc0xsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDIXHGxzY2htZWx0aW5nQHBvc3Rlby5jb20ACgkQIvQJ NmE4ba22QwD/bhwbD/Bb2EldOOQP75bWL1sZe5+xkn/aBUuwz1kVxccBAMlvuZ2D uazyPRkePewgYWsjnMy5QIV7wEDQWS/icisF =iVlZ -----END PGP SIGNATURE-----