From 6d28883a735680b4637ec6c54e6cae397a57d634 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 3 Jan 2024 14:46:16 +0100 Subject: [PATCH] Only mount cache overlay if base trees are specified and Overlay= is not enabled The setup() method of some distributions creates files in the root directory which means that checking if the root directory is empty doesn't work. Instead, let's check if any base trees were specified explicitly. --- mkosi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 4d1a69bfc..f3bae373c 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -312,7 +312,7 @@ def configure_autologin(context: Context) -> None: @contextlib.contextmanager def mount_cache_overlay(context: Context) -> Iterator[None]: - if not context.config.incremental or not any(context.root.iterdir()): + if not context.config.incremental or not context.config.base_trees or context.config.overlay: yield return -- 2.47.2