]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Store default tools tree outside of output directory
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 25 Mar 2025 14:20:12 +0000 (15:20 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 25 Mar 2025 14:25:58 +0000 (15:25 +0100)
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.

.gitignore
mkosi/__init__.py

index eef2376024c1422aaad1270f90ba3b9030be1514..d38dcd4346537a6906d36087a4fc4e7de91b6c2c 100644 (file)
@@ -24,6 +24,7 @@
 mkosi.local
 mkosi.local.conf
 mkosi.tools
+mkosi.tools.manifest
 /mkosi.key
 /mkosi.crt
 __pycache__
index 602ee2e2f01a5d165f71574a0578f87f4899f9de..f81e45450225e42fd21e25a163480860ceab40cd 100644 (file)
@@ -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",