From: Daan De Meyer Date: Tue, 25 Mar 2025 14:20:12 +0000 (+0100) Subject: Store default tools tree outside of output directory X-Git-Tag: v26~302^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e994ce9fe8433d169420e90367dc56d127c4a2cc;p=thirdparty%2Fmkosi.git Store default tools tree outside of output directory A common workflow is to build the same image multiple times with slightly different settings, using a different output directory for each build. By storing the default tools tree inside the configured output directory, we end up rebuilding the tools tree for every single one of these builds, even though in almost all cases the tools tree for each image will be identical. Let's address this issue by not storing the default tools tree in the configured output directory but instead storing it in the current working directory. --- diff --git a/.gitignore b/.gitignore index eef237602..d38dcd434 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ mkosi.local mkosi.local.conf mkosi.tools +mkosi.tools.manifest /mkosi.key /mkosi.crt __pycache__ diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 602ee2e2f..f81e45450 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4512,7 +4512,6 @@ def finalize_default_tools(config: Config, *, resources: Path) -> Config: f"--repository-key-check={config.repository_key_check}", f"--repository-key-fetch={config.repository_key_fetch}", f"--cache-only={config.cacheonly}", - *([f"--output-directory={os.fspath(p)}"] if (p := config.output_dir) else []), *([f"--workspace-directory={os.fspath(p)}"] if (p := config.workspace_dir) else []), *([f"--package-cache-directory={os.fspath(p)}"] if (p := config.package_cache_dir) else []), "--incremental=no",