coreos-assembler icon indicating copy to clipboard operation
coreos-assembler copied to clipboard

update `cosa diff --metal` to work on s390x/ppc64le

Open dustymabe opened this issue 1 month ago • 1 comments

The current implementation assumes that all metal images have an EFI-SYSTEM partition. If this partition is not found, g.findfs_label() will raise an exception, causing the diff operation to fail. This could be an issue for BIOS-only images. To make this more robust, you should handle the case where the EFI partition is not present.

            try:
                efi = g.findfs_label("EFI-SYSTEM")
                g.mount_ro(efi, "/boot/efi")
            except RuntimeError:
                # Not all images have an EFI partition, so we can ignore.
                pass

Originally posted by @gemini-code-assist[bot] in https://github.com/coreos/coreos-assembler/pull/4360#discussion_r2496133644

dustymabe avatar Nov 07 '25 15:11 dustymabe

The s390x and ppc64le architectures don't have an EFI partition so let's update the code to address that.

dustymabe avatar Nov 07 '25 15:11 dustymabe