From: Marc Herbert Date: Tue, 11 Nov 2025 00:12:49 +0000 (-0800) Subject: make_image: log systemd-repart *.conf files at the --debug level X-Git-Tag: v26~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20009b7f48ab1e97e6f646b011eff69ab7ba0e71;p=thirdparty%2Fmkosi.git make_image: log systemd-repart *.conf files at the --debug level As discussed in #3948, systemd-repart *.conf files have default values which is convenient until this fails with some dreaded "disk full" error - then it becomes very mysterious. To considerably speed up the investigation about what exactly is full, show the configuration files in use when using --debug. Signed-off-by: Marc Herbert (cherry picked from commit 7040a6add12c8f8c1c8393d5e35c747ee2876472) Signed-off-by: Marc Herbert --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 5c0b6fe99..b11eedb77 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -3449,6 +3449,15 @@ def make_image( ): env["SYSTEMD_REPART_MKFS_EXT4_OPTIONS"] = "-O ^orphan_file" + if ARG_DEBUG.get(): + for dir in definitions: + for c in dir.glob("*.conf"): + # Do not spam the logs in case something goes wrong + logging.debug(f"# {c} (truncated to 100 lines)") + with open(c) as f: + for line in itertools.islice(f, 100): + logging.debug(line.strip()) + with complete_step(msg): output = json.loads( run_systemd_sign_tool(