RPM helper module¶
- class rebasehelper.helpers.rpm_helper.RpmHelper[source]¶
Class for working with RPM database and packages.
- ARCHES: List[str] = []¶
- static all_packages_installed(pkg_names=None)[source]¶
Checks if all specified packages are installed.
- Parameters:
pkg_names (list) – List of package names to check.
- Returns:
True if all packages are installed, False otherwise.
- Return type:
bool
- static get_header_from_rpm(rpm_name)[source]¶
Gets an RPM header from the given RPM package.
- Parameters:
rpm_name (str) – Path to the package.
- Returns:
Header object obtained from the package.
- Return type:
- static install_build_dependencies(spec_path=None, assume_yes=False)[source]¶
Installs build dependencies of a package using dnf.
- Parameters:
spec_path (str) – Absolute path to the SPEC file.
assume_yes (bool) – Whether to automatically answer ‘yes’ to all questions.
- Returns:
Exit code of the subprocess run.
- Return type:
int