Skip to content

Commit

Permalink
Drop compression suffix for directory output
Browse files Browse the repository at this point in the history
The automatic logic would produce a name like "initrd_6.6.0.zst", even though
there is no compression.
  • Loading branch information
keszybz authored and behrmann committed Nov 11, 2023
1 parent cc1fa74 commit 2342a74
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mkosi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def extension(self) -> str:
OutputFormat.uki: ".efi",
}.get(self, "")

def use_outer_compression(self) -> bool:
return self in (OutputFormat.tar,
OutputFormat.cpio,
OutputFormat.disk)


class ManifestFormat(StrEnum):
json = enum.auto() # the standard manifest in json format
Expand Down Expand Up @@ -972,7 +977,7 @@ def output_with_format(self) -> str:
def output_with_compression(self) -> str:
output = self.output_with_format

if self.compress_output and self.output_format not in (OutputFormat.uki, OutputFormat.esp):
if self.compress_output and self.output_format.use_outer_compression():
output += f".{self.compress_output}"

return output
Expand Down

0 comments on commit 2342a74

Please sign in to comment.