From: Luca Boccassi Date: Thu, 18 Aug 2022 01:03:20 +0000 (+0100) Subject: name squashfs images as .raw too X-Git-Tag: v14~78^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1127%2Fhead;p=thirdparty%2Fmkosi.git name squashfs images as .raw too This is expected by systemd when used with RootImage= and friends --- 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)