From c905b07ba3624465ddd38fd9eedb684836d5e1d9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 12 Feb 2018 13:59:55 +0100 Subject: [PATCH] mkosi: use pxz instead of xz if it's installed Fixes: #227 --- mkosi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mkosi b/mkosi index ea2514d49..8d906d0bb 100755 --- a/mkosi +++ b/mkosi @@ -2140,9 +2140,11 @@ def xz_output(args, raw): if not args.xz: return raw + xz_binary = "pxz" if shutil.which("pxz") else "xz" + with complete_step('Compressing image file'): f = tempfile.NamedTemporaryFile(prefix=".mkosi-", dir=os.path.dirname(args.output)) - run(["xz", "-c", raw.name], stdout=f, check=True) + run([xz_binary, "-c", raw.name], stdout=f, check=True) return f -- 2.47.2