machine_core: Add Machine.ws_container runtime detection #7361
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want to introduce proper bootc image testing for cockpit. In that scenario we want to install the actual rpm, not use the cockpit/ws container. This conflicts with cockpit-ostree's current assumption that the centos-9-bootc image always uses the ws container.
Thus make this check dynamic: If cockpit-ws package is installed (check for
/usr/share/cockpit/static
as that's the same on all distros and a cheap test), use it, otherwise use the ws container. Keep theTEST_SCENARIO=ws-container
check, at least until we update cockpit-ostree's image preparation to remove cockpit-ws.rpm.We can't yet run
.execute()
in the Machine constructor, so delay the detection by makingws_container
a (cached) property.This will be used in cockpit-project/cockpit#21559 . I triggered a set of ostree/bootc/standard RPM tests here to check for regressions.