@@ -133,14 +133,10 @@ class SWUGenerator:
"Cannot compress %s with %s", entry["filename"], cmd
)
sys.exit(1)
new.fullfilename = new_path
-
- if entry.get("type") == "ubivol":
- entry.setdefault("properties", {}) \
- .update({ "decompressed-size": str(new.getsize()) })
# compression cannot be used with delta, because it has own compressor
elif ("type" in entry) and entry["type"] == "delta":
cmd = [
"zck",
"-u",
@@ -225,10 +221,13 @@ class SWUGenerator:
entry["filename"] = new.newfilename
if not self.nohash:
entry["sha256"] = new.getsha256()
if "encrypted" in entry and entry["encrypted"] is True:
entry["ivt"] = new.ivt
+ if entry.get("compressed") and not self.nocompress:
+ entry.setdefault("properties", {}) \
+ .update({ "decompressed-size": str(new.getsize()) })
def find_files_in_swdesc(self, first):
for n, val in first.items():
if isinstance(val, libconf.AttrDict):
self.find_files_in_swdesc(val)