From d154f5685501650338ebf804ac6ab5dd6ede2dbb Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Wed, 27 Apr 2011 13:56:47 +0200 Subject: [PATCH] Use crc32 check when compressing with xz --- src/pylorax/installtree.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pylorax/installtree.py b/src/pylorax/installtree.py index f7502ebc..13ae6f15 100644 --- a/src/pylorax/installtree.py +++ b/src/pylorax/installtree.py @@ -521,7 +521,11 @@ class LoraxInstallTree(BaseLoraxClass): stdin=find.stdout, stdout=subprocess.PIPE, preexec_fn=chdir) - compressed = subprocess.Popen([type, "-%s" % speed], stdin=cpio.stdout, + cmd = [type, "-%s" % speed] + if type == "xz": + cmd.append("--check=crc32") + + compressed = subprocess.Popen(cmd, stdin=cpio.stdout, stdout=open(initrd.fpath, "wb")) logger.debug("compressing")