From 7f087ead733e5b30b8a3071150da077e4bff2e69 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Wed, 20 Jul 2011 16:42:06 -0400 Subject: [PATCH] imgutils: allow mksquashfs to use its default compression --- src/pylorax/imgutils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pylorax/imgutils.py b/src/pylorax/imgutils.py index 1894cb14..50b3afdb 100644 --- a/src/pylorax/imgutils.py +++ b/src/pylorax/imgutils.py @@ -46,10 +46,11 @@ def mkcpio(rootdir, outfile, compression="xz", compressargs=["-9"]): comp.wait() return comp.returncode -def mksquashfs(rootdir, outfile, compression="xz", compressargs=[]): +def mksquashfs(rootdir, outfile, compression="default", compressargs=[]): '''Make a squashfs image containing the given rootdir.''' - return call(["mksquashfs", rootdir, outfile, - "-comp", compression] + compressargs) + if compression != "default": + compressargs = ["-comp", compression] + compressargs + return call(["mksquashfs", rootdir, outfile] + compressargs) ######## Utility functions ###############################################