Skip to content

powerpc: Fix broken build#1074

Merged
HuijingHei merged 1 commit intocoreos:mainfrom
ckyrouac:ppc-fix
Mar 24, 2026
Merged

powerpc: Fix broken build#1074
HuijingHei merged 1 commit intocoreos:mainfrom
ckyrouac:ppc-fix

Conversation

@ckyrouac
Copy link
Copy Markdown
Contributor

The powerpc build was attempting to use removed APIs from the blockdev crate. Update the powerpc target_device function to use the new Device APIs.

Assisted-by: Claude Code (Opus 4)

The powerpc build was attempting to use removed APIs from the blockdev
crate. Update the powerpc target_device function to use the new Device
APIs.

Assisted-by: Claude Code (Opus 4)
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 23, 2026

Hi @ckyrouac. Thanks for your PR.

I'm waiting for a coreos member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors device handling in src/bios.rs by introducing a Device abstraction, replacing raw string paths in functions like target_device and run_grub_install. This simplifies how device paths and partitions are managed, especially for GRUB installation. A minor improvement opportunity was noted regarding the error message in target_device to include both PREPBOOT_GUID and PREPBOOT_MBR_TYPE for better clarity.

Comment on lines 33 to 35
.ok_or_else(|| {
anyhow::anyhow!("Failed to find PReP partition with GUID {PREPBOOT_GUID}")
})?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error message is a bit misleading as it only mentions the PREPBOOT_GUID. The code also searches for PREPBOOT_MBR_TYPE. Including both in the error message would be clearer for debugging purposes.

Suggested change
.ok_or_else(|| {
anyhow::anyhow!("Failed to find PReP partition with GUID {PREPBOOT_GUID}")
})?;
.ok_or_else(|| {
anyhow::anyhow!("Failed to find PReP partition with GUID {PREPBOOT_GUID} or type {PREPBOOT_MBR_TYPE}")
})?

@HuijingHei
Copy link
Copy Markdown
Member

/ok-to-test

Copy link
Copy Markdown
Member

@HuijingHei HuijingHei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HuijingHei HuijingHei merged commit 46ec982 into coreos:main Mar 24, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants