From: Daan De Meyer Date: Wed, 3 Jan 2024 13:44:09 +0000 (+0100) Subject: Cache skeleton trees X-Git-Tag: v20~17^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5286ee3e45a0c3fcd9562959d0758a1bdc733861;p=thirdparty%2Fmkosi.git Cache skeleton trees These are only intended for files that affect package manager operation so we should be able to cache this step without any issues since if the skeleton tree is changed, users are likely going to want to throw away their cache regardless. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index ed358efdc..4d1a69bfc 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -2619,13 +2619,13 @@ def build_image(args: Args, config: Config) -> None: with mount_base_trees(context): install_base_trees(context) - install_skeleton_trees(context) cached = reuse_cache(context) context.config.distribution.setup(context) if not cached: with mount_cache_overlay(context): + install_skeleton_trees(context) install_distribution(context) run_prepare_scripts(context, build=False) install_build_packages(context) diff --git a/mkosi/resources/mkosi.md b/mkosi/resources/mkosi.md index 0392d18cf..c2944c778 100644 --- a/mkosi/resources/mkosi.md +++ b/mkosi/resources/mkosi.md @@ -901,6 +901,11 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`, purpose with the root directory as target (also see the **Files** section below). +: Note that skeleton trees are cached and any changes to skeleton trees + after a cached image has been built (when using `Incremental=`) are + only applied when the cached image is rebuilt (by using `-ff` or + running `mkosi -f clean`). + : As with the base tree logic above, instead of a directory, a tar file may be provided too. `mkosi.skeleton.tar` will be automatically used if found in the local directory.