]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Cache hwdb step 4080/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 19 Dec 2025 20:02:30 +0000 (21:02 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 20 Dec 2025 15:39:55 +0000 (16:39 +0100)
Running hwdb takes roughly a second and is
unlikely to ever rely on files added by extra
trees or such, so let's cache the step instead of
re-running it every single time.

mkosi/__init__.py

index 434b2bbe0c7f59153fa0f972b35b5af10b95eb27..097185c33237e9f27e10c05673839166ebb235d3 100644 (file)
@@ -3988,6 +3988,7 @@ def build_image(context: Context) -> None:
             run_prepare_scripts(context, build=True)
             fixup_vmlinuz_location(context)
             run_depmod(context, cache=True)
+            run_hwdb(context)
 
             save_cache(context)
             reuse_cache(context)
@@ -4028,7 +4029,6 @@ def build_image(context: Context) -> None:
         run_preset(context)
         run_depmod(context)
         run_firstboot(context)
-        run_hwdb(context)
 
         # These might be removed by the next steps, so let's save them for later if needed.
         stub, kver, kimg, microcode = save_esp_components(context)