Add utilities for determining system state.
Review Request #13463 — Created Dec. 26, 2023 and submitted — Latest diff uploaded
This introduces
rbinstall.state
, which contains functions (primarily
get_system_info()
) for determining state that will be used throughout
the installer process.
get_system_info()
determines the operating system and architecture of
the target system. This primarily centers around Linux (though there's
some WIP for macOS with Homebrew).For Linux, information on the current distro is retrieved and parsed,
and used to determine the default installer method (Yum, Apt, etc.), the
distro ID and families, version, and other identifying information.
These will later be used for package selection.The beginnings of
rbinstall.install_methods
was also added, providing
an enum of install method constants that are needed in
get_system_info()
.Unit tests are available for
state.py
methods. We usekgb
,pytest
,
andpytest-sugar
(an extension that provides better output and
immediate failure information for pytest runs).
Unit tests pass.
Tested this along with the rest of the in-progress changes on a variety
of Linux distributions.