]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Drop verb and cmdline from summary
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 20 Oct 2023 13:41:52 +0000 (15:41 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 20 Oct 2023 14:38:32 +0000 (16:38 +0200)
The summary is only printed when we use the summary verb which doesn't
take command line arguments, so both of these are self evident and will
always have the same value.

mkosi/__init__.py
mkosi/config.py

index 38698010aac477b4637d7ffb9ee4626580a525e0..be1a05ba35d43f8ac2db952986c21edaaf26a2bf 100644 (file)
@@ -2528,7 +2528,7 @@ def run_verb(args: MkosiArgs, presets: Sequence[MkosiConfig]) -> None:
         text = ""
 
         for config in presets:
-            text += f"{summary(args, config)}\n"
+            text += f"{summary(config)}\n"
 
         page(text, args.pager)
         return
index 5bbb496633e67f7d1397e5694b69c82c9113a3d6..ab2207e0d7b4a76889afe25a9118872707661e93 100644 (file)
@@ -2614,7 +2614,7 @@ def format_bytes_or_none(num_bytes: Optional[int]) -> str:
     return format_bytes(num_bytes) if num_bytes is not None else "none"
 
 
-def summary(args: MkosiArgs, config: MkosiConfig) -> str:
+def summary(config: MkosiConfig) -> str:
     def bold(s: Any) -> str:
         return f"{Style.bold}{s}{Style.reset}"
 
@@ -2624,10 +2624,6 @@ def summary(args: MkosiArgs, config: MkosiConfig) -> str:
     summary = f"""\
 {bold(f"PRESET: {config.preset or 'default'}")}
 
-    {bold("COMMANDS")}:
-                          Verb: {bold(args.verb)}
-                       Cmdline: {bold(" ".join(args.cmdline))}
-
     {bold("CONFIG")}:
                        Include: {line_join_list(config.include)}