Module sysbot.modules.linux.dnf
DNF Package Manager Module
This module provides methods for interacting with the DNF package manager on RHEL/Fedora-based Linux systems, including repository management and package operations.
Classes
class Dnf-
DNF package manager operations class for RHEL/Fedora-based systems.
Ancestors
Methods
def clean(self, alias: str, **kwargs) ‑> int-
Clean all cached DNF data.
Args
alias- Session alias for the connection.
**kwargs- Additional command execution options.
Returns
Exit code of the command (0 on success, non-zero on failure).
def install_assumeno(self, alias: str, package: str, **kwargs) ‑> int-
Test installation and dependency resolution for a package without applying changes.
Runs
dnf install -y --assumenoto perform a dry-run that resolves all dependencies and reports what would be installed, without modifying the system.Args
alias- Session alias for the connection.
package- Name of the package to test.
**kwargs- Additional command execution options.
Returns
Exit code of the command (0 if dependencies can be resolved, non-zero otherwise).
def makecache(self, alias: str, **kwargs) ‑> int-
Update the DNF package metadata cache.
Args
alias- Session alias for the connection.
**kwargs- Additional command execution options.
Returns
Exit code of the command (0 on success, non-zero on failure).
def repofile(self, alias: str, file: str, **kwargs) ‑> dict-
Parse a DNF repository configuration file.
Args
alias- Session alias for the connection.
file- Path to the repository configuration file.
**kwargs- Additional command execution options.
Returns
Dictionary with repository configuration sections and their values.
def repolist(self, alias: str, **kwargs) ‑> list-
Get list of DNF repositories.
Args
alias- Session alias for the connection.
**kwargs- Additional command execution options.
Returns
List of dictionaries containing repository information, each with 'id' and 'name' keys.
def search(self, alias: str, keyword: str, **kwargs) ‑> list-
Search for DNF packages matching a keyword.
Args
alias- Session alias for the connection.
keyword- Search term to look up in package names and summaries.
**kwargs- Additional command execution options.
Returns
List of dictionaries containing matching package information, each with 'name' and 'summary' keys.