From: Lennart Poettering Date: Mon, 12 Feb 2018 12:59:55 +0000 (+0100) Subject: mkosi: use pxz instead of xz if it's installed X-Git-Tag: v5~62^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F238%2Fhead;p=thirdparty%2Fmkosi.git mkosi: use pxz instead of xz if it's installed Fixes: #227 --- 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