]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
qemu: Don't write any log messages when running qemu 1417/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 30 Mar 2023 12:00:34 +0000 (14:00 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 30 Mar 2023 19:37:51 +0000 (21:37 +0200)
The running command message can get huge depending on which credentials
you're using so let's not write it by default (can still get it with
--debug run). And the swtpm message isn't super useful either so let's
drop it as well.

mkosi/__init__.py

index 8877a29de7e648b8f7444587bd47c9e76e987fc4..dfc0978a0b1998f06e91c37cc22808b8c77b9bd0 100644 (file)
@@ -16,7 +16,6 @@ import os
 import platform
 import re
 import resource
-import shlex
 import shutil
 import string
 import subprocess
@@ -127,11 +126,6 @@ def list_to_string(seq: Iterator[str]) -> str:
     return str(list(seq))[1:-1]
 
 
-def print_running_cmd(cmdline: Iterable[PathString]) -> None:
-    MkosiPrinter.print_step("Running command:")
-    MkosiPrinter.print_step(" ".join(shlex.quote(str(x)) for x in cmdline) + "\n")
-
-
 # EFI has its own conventions too
 EFI_ARCHITECTURES = {
     "x86_64": "x64",
@@ -3493,7 +3487,6 @@ def qemu_check_kvm_support() -> bool:
 def start_swtpm() -> Iterator[Optional[Path]]:
 
     if not shutil.which("swtpm"):
-        MkosiPrinter.info("Couldn't find swtpm binary, not invoking qemu with TPM2 device.")
         yield None
         return
 
@@ -3639,7 +3632,6 @@ def run_qemu(config: MkosiConfig) -> None:
         cmdline += config.qemu_args
         cmdline += config.cmdline
 
-        print_running_cmd(cmdline)
         run(cmdline, stdout=sys.stdout, env=os.environ)