Skip to content

cli: Fix switch --mutate-in-place to work outside booted environment#1855

Merged
cgwalters merged 1 commit intobootc-dev:mainfrom
cgwalters:switch-mutate-in-place
Dec 17, 2025
Merged

cli: Fix switch --mutate-in-place to work outside booted environment#1855
cgwalters merged 1 commit intobootc-dev:mainfrom
cgwalters:switch-mutate-in-place

Conversation

@cgwalters
Copy link
Copy Markdown
Collaborator

Move the --mutate-in-place handling before get_storage() so it doesn't require a fully booted ostree environment. This enables use cases like Anaconda where we're chrooted into a non-booted system.

Closes: #1854
Assisted-by: OpenCode (claude-sonnet-4-20250514)

@bootc-bot bootc-bot bot requested a review from ckyrouac December 15, 2025 22:28
Copy link
Copy Markdown
Contributor

@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 correctly refactors the --mutate-in-place logic to work outside of a fully booted ostree environment, which is a great improvement for use cases like Anaconda. The addition of integration tests for this scenario is also valuable. However, the change introduces a regression by removing the explicit check that prevents this command from running on an unsupported composefs backend. This would lead to a confusing error for users. My review includes a suggestion to re-introduce a check to ensure the command fails gracefully on unsupported backends.

Move the --mutate-in-place handling before get_storage() so it doesn't
require a fully booted ostree environment. This enables use cases like
Anaconda where we're chrooted into a non-booted system.

Closes: bootc-dev#1854
Assisted-by: OpenCode (claude-sonnet-4-20250514)
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters force-pushed the switch-mutate-in-place branch from 2fbbb83 to 283896e Compare December 15, 2025 22:33
@cgwalters cgwalters enabled auto-merge (rebase) December 15, 2025 22:33
@cgwalters cgwalters merged commit f7b41cc into bootc-dev:main Dec 17, 2025
78 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants