From 28713127605a26688c30e06e3f245934469f7fa4 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 18 Aug 2022 02:03:20 +0100 Subject: [PATCH] name squashfs images as .raw too This is expected by systemd when used with RootImage= and friends --- NEWS.md | 1 + mkosi/__init__.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index d92ef9768..dd2d2a4fd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -17,6 +17,7 @@ time. - The preferred names for mkosi configuration files and directories are now mkosi.conf and mkosi.conf.d/ respectively. The old names (mkosi.default and mkosi.default.d) have been removed from the docs but are still supported for backwards compatibility. +- `plain_squashfs` type images will now also be named with a `.raw` suffix. ## v13 diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 9d0c8c424..5848d03df 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -6485,6 +6485,8 @@ def load_args(args: argparse.Namespace) -> MkosiArgs: output = f"{prefix}.tar.xz" elif args.output_format == OutputFormat.cpio: output = f"{prefix}.cpio" + (f".{args.compress}" if args.compress else "") + elif args.output_format.is_squashfs(): + output = f"{prefix}.raw" else: output = prefix args.output = Path(output) -- 2.47.2