No compression with encryption

When an image is setup to use encryption the resulting image appears
as a random stream of bytes and cannot be compressed. Simply skip
the compression in this case.
This commit is contained in:
Robert Schweikert 2021-08-27 07:47:05 -04:00
parent b2a78ce0b6
commit bdba953629
No known key found for this signature in database
GPG Key ID: 40EB506EFF1FB2C3

View File

@ -463,13 +463,14 @@ class DiskBuilder:
self.diskname
)
# store image file name in result
compression = self.runtime_config.get_bundle_compression(default=True)
if self.luks != None:
compression = False
self.result.add(
key='disk_image',
filename=self.diskname,
use_for_bundle=True if not self.image_format else False,
compress=self.runtime_config.get_bundle_compression(
default=True
),
compress=compression,
shasum=True
)