From 311cba115a45b9291bad58915506fce36399fc7d Mon Sep 17 00:00:00 2001 From: Gerard Salvatella Date: Wed, 1 Jun 2022 17:44:45 +0200 Subject: [PATCH] mkosi: create bmap before compression Creation of bmap files needs to take place before any compression happens, since bmaptool has to know where the "holes" of the image lie. Compression removes the holes, preventing bmap from recreating the original raw image. Move the bmap calculation step before the compression. --- mkosi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 4381ea225..e24ba0720 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -7448,6 +7448,7 @@ def build_stuff(args: MkosiArgs) -> Manifest: MkosiPrinter.print_step("Skipping (second) final image build phase.") raw = qcow2_output(args, image.raw) + bmap = calculate_bmap(args, raw) raw = compress_output(args, raw) split_root = compress_output(args, image.split_root, ".usr" if args.usr_only else ".root") split_verity = compress_output(args, image.split_verity, ".verity") @@ -7469,7 +7470,6 @@ def build_stuff(args: MkosiArgs) -> Manifest: settings, ) signature = calculate_signature(args, checksum) - bmap = calculate_bmap(args, raw) link_output(args, root, raw or image.archive) link_output_root_hash_file(args, root_hash_file) -- 2.47.2