RPM helper module

class rebasehelper.helpers.rpm_helper.RpmHeader(hdr: <sphinx.ext.autodoc.importer._MockObject object at 0x7f123f5a9b80>)[source]
class rebasehelper.helpers.rpm_helper.RpmHelper[source]

Class for working with RPM database and packages.

ARCHES = []
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:RpmHeader
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

static is_package_installed(pkg_name=None)[source]

Checks whether a package is installed.

Parameters:pkg_name (str) – Name of the package.
Returns:Whether the package is installed.
Return type:bool