]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
mkosi,addon: print the mkosi cmdline with --debug
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 28 Feb 2025 11:50:23 +0000 (12:50 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 14 Mar 2025 09:56:32 +0000 (10:56 +0100)
This is very important, without that it's hard to figure out what is actually
hapenning.

mkosi/addon.py
mkosi/initrd.py

index 1c1a8ed97d11665dff6db6533e8bffdd663dbef6..cf388f7ec69c37277fd76e61d2c15562bdc0a389 100644 (file)
@@ -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"]
index 782ffeda0ef0f3933ef7802174acb4357da8b88f..cd9df7bf5dc428b85cb1c277e8c3a93b06fe2087 100644 (file)
@@ -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"]