Add utilities for determining system state.

Review Request #13463 — Created Dec. 26, 2023 and submitted — Latest diff uploaded

Information

rbinstall
master

Reviewers

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 use kgb, pytest,
and pytest-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.

Diff Revision 1

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

orig
1
2
3

Commits

First Last Summary ID Author
Add utilities for determining system state.
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 use `kgb`, `pytest`, and `pytest-sugar` (an extension that provides better output and immediate failure information for pytest runs).
e801f6018c1bfc9e98f9e85945b0018178b2fc78 Christian Hammond
dev-requirements.txt
pyproject.toml
rbinstall/install_methods.py
rbinstall/state.py
rbinstall/tests/__init__.py
rbinstall/tests/test_state.py
Loading...