From: Daan De Meyer Date: Wed, 21 Jun 2023 11:12:46 +0000 (+0200) Subject: Run systemd-hwdb when building an image X-Git-Tag: v15~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c79efe6e95a3e5b7c5a0380c19d52918dc4605ac;p=thirdparty%2Fmkosi.git Run systemd-hwdb when building an image --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 8335f7c58..b821d2341 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1478,6 +1478,11 @@ def run_preset(state: MkosiState) -> None: run(["systemctl", "--root", state.root, "preset-all"]) +def run_hwdb(state: MkosiState) -> None: + with complete_step("Generating hardware database"): + run(["systemd-hwdb", "--root", state.root, "--usr", "--strict", "update"]) + + def run_firstboot(state: MkosiState) -> None: password, hashed = state.config.root_password or (None, False) pwopt = "--root-password-hashed" if hashed else "--root-password" @@ -1741,6 +1746,7 @@ def build_image(args: MkosiArgs, config: MkosiConfig, uid: int, gid: int) -> Non run_preset(state) run_depmod(state) run_firstboot(state) + run_hwdb(state) remove_packages(state) if manifest: