coreos / coreos/coreos-assembler

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

Open
#4,364 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
393
Forks
193
Avg merge
17h 6m
Merged PRs (30d)
5

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the implementation of cosa diff --metal and inspect the EFI partition lookup and mount path. Reproduce the command with a BIOS-only s390x or ppc64le image; done means the diff no longer fails when EFI-SYSTEM is absent and still handles images that include it.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.