Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
machine_core: Add Machine.ws_container runtime detection
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 the `TEST_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 making `ws_container` a (cached) property.
- Loading branch information