From: Zbigniew Jędrzejewski-Szmek Date: Fri, 28 Feb 2025 11:50:23 +0000 (+0100) Subject: mkosi,addon: print the mkosi cmdline with --debug X-Git-Tag: v26~316^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=684bb3c999012cd04c66a46a3aede5fcf746fb14;p=thirdparty%2Fmkosi.git mkosi,addon: print the mkosi cmdline with --debug This is very important, without that it's hard to figure out what is actually hapenning. --- diff --git a/mkosi/addon.py b/mkosi/addon.py index 1c1a8ed97..cf388f7ec 100644 --- a/mkosi/addon.py +++ b/mkosi/addon.py @@ -10,7 +10,7 @@ import mkosi.resources from mkosi.config import DocFormat from mkosi.documentation import show_docs from mkosi.initrd import include_system_config, initrd_common_args, initrd_finalize, process_crypttab -from mkosi.log import log_setup +from mkosi.log import ARG_DEBUG, ARG_DEBUG_SHELL, log_setup from mkosi.run import run, uncaught_exception_handler from mkosi.util import PathString, resource_path @@ -58,8 +58,10 @@ def main() -> None: ] # fmt: skip if args.debug: + ARG_DEBUG.set(args.debug) cmdline += ["--debug"] if args.debug_shell: + ARG_DEBUG_SHELL.set(args.debug_shell) cmdline += ["--debug-shell"] if args.debug_sandbox: cmdline += ["--debug-sandbox"] diff --git a/mkosi/initrd.py b/mkosi/initrd.py index 782ffeda0..cd9df7bf5 100644 --- a/mkosi/initrd.py +++ b/mkosi/initrd.py @@ -15,7 +15,7 @@ from typing import Optional, cast import mkosi.resources from mkosi.config import DocFormat, InitrdProfile, OutputFormat from mkosi.documentation import show_docs -from mkosi.log import log_notice, log_setup +from mkosi.log import ARG_DEBUG, ARG_DEBUG_SHELL, log_notice, log_setup from mkosi.run import find_binary, run, uncaught_exception_handler from mkosi.sandbox import __version__, umask from mkosi.tree import copy_tree @@ -298,8 +298,10 @@ def main() -> None: ] if args.debug: + ARG_DEBUG.set(args.debug) cmdline += ["--debug"] if args.debug_shell: + ARG_DEBUG_SHELL.set(args.debug_shell) cmdline += ["--debug-shell"] if args.debug_sandbox: cmdline += ["--debug-sandbox"]