dnf.util._BootcSystem.is_bootc_system() static method detects OSTree system now.
Observe the name does not match what the method does.
When dnf.util._BootcSystem() constructor is called later, it throws an backtrace e.g. if "OSTree" gobject-introspection is not installed. The constructor trusts is_bootc_system() that it detects Bootc.
dnf.spec intentionally keeps Bootc dependencies optional and delegates them to an optional dnf-bootc subpackage.
These backtraces happen when a user mounts /run from an OSTree system into a container and executes dnf from the container (https://issues.redhat.com/browse/OCPBUGS-56964).
We should make dnf more robust when detecting Bootc. The team agreed that a solution is changing is_bootc_system() to probe for Bootc instead of OSTree.