Package

class libdnf5.rpm.Package(*args)
get_arch()
Return type:

string

Returns:

RPM package Arch (RPMTAG_ARCH).

Since: 5.0

get_base()
Return type:

libdnf5::BaseWeakPtr

Returns:

The Base object to which this object belongs.

Since: 5.0.5

get_baseurl()
Return type:

string

Returns:

RPM package baseurl from repodata (<location xml:base=”…”>).

Since: 5.0

get_build_time()
Return type:

int

Returns:

RPM package build timestamp (RPMTAG_BUILDTIME).

Since: 5.0

get_changelogs()
Return type:

std::vector< libdnf5::rpm::Changelog,std::allocator< libdnf5::rpm::Changelog > >

Returns:

List of package changelog entries. If other repository metadata are

Since: 5.0

get_checksum()
Return type:

Checksum

Returns:

Checksum object representing RPM package checksum and its type (<checksum type=”type”>checksum<checksum>).

Since: 5.0

get_conflicts()
Return type:

ReldepList

Returns:

List of RPM package Conflicts (RPMTAG_CONFLICTNAME, RPMTAG_CONFLICTFLAGS, RPMTAG_CONFLICTVERSION).

Since: 5.0

get_debuginfo_name()
Return type:

string

Returns:

name of the debuginfo package for this package. If this package is a debuginfo package, return its name. If this package is a debugsource package, returns the debuginfo package for the base package. E.g. kernel-PAE -> kernel-PAE-debuginfo

Since: 5.0.10

get_debuginfo_name_of_source()
Return type:

string

Returns:

name of the debuginfo package for source package of this package. E.g. krb5-libs -> krb5-debuginfo

Since: 5.0.10

get_debugsource_name()
Return type:

string

Returns:

name of the debugsource package for this package E.g. krb5-libs -> krb5-debugsource

Since: 5.0.10

get_depends()
Return type:

ReldepList

Returns:

List of RPM package dependencies (requires + enhances + suggests + supplements + recommends).

Since: 5.0.10

get_description()
Return type:

string

Returns:

RPM package Description (RPMTAG_DESCRIPTION).

Since: 5.0

get_download_size()
Return type:

int

Returns:

File size of the RPM package.

Since: 5.0

get_enhances()
Return type:

ReldepList

Returns:

List of RPM package Enhances (RPMTAG_ENHANCENAME, RPMTAG_ENHANCEFLAGS, RPMTAG_ENHANCEVERSION).

Since: 5.0

get_epoch()
Return type:

string

Returns:

RPM package Epoch (RPMTAG_EPOCH).

Since: 5.0

get_evr()
Return type:

string

Returns:

RPM package EVR (Epoch:Version-Release). If the Epoch is 0, it is omitted from the output.

Since: 5.0

get_files()
Return type:

std::vector< std::string,std::allocator< std::string > >

Returns:

List of files and directories the RPM package contains (RPMTAG_FILENAMES). If file lists are not loaded, empty list is returned.

Since: 5.0 Notes: Information whether the returned files are actual files, directories or ghosted files is not available.

get_from_repo_id()

TODO is_local For an installed package, return id of repo from the package was installed. For an available package, return an empty string.

get_full_nevra()
Return type:

string

Returns:

RPM package NEVRA (Name-Epoch:Version-Release.Arch). The Epoch is always present even if it is 0.

Since: 5.0

get_group()
Return type:

string

Returns:

RPM package Group (RPMTAG_GROUP).

Since: 5.0

get_hash()

Return unique ID representing Package

get_hdr_checksum()
Return type:

Checksum

Returns:

Checksum object representing RPM package header checksum and its type.

Since: 5.0

get_hdr_end()
Return type:

int

Returns:

RPM package header end (the header is located between file position 0 and the returned offset).

Since: 5.0

get_id()
get_install_size()
Return type:

int

Returns:

Size the RPM package should occupy after installing on disk (RPMTAG_LONGSIZE). The information is always present - it is retrieved from rpmdb if the package is installed or from repodata if the package is available.

Since: 5.0 Notes: The actual size on disk may vary based on block size and filesystem overhead.

Libdnf doesn’t provide any method to compute the actual size on disk.

get_install_time()
Return type:

int

Returns:

The unix timestamp (seconds since epoch) of when the package was installed. Return 0 if the package is not installed.

get_license()
Return type:

string

Returns:

RPM package License (RPMTAG_LICENSE).

Since: 5.0

get_location()
Return type:

string

Returns:

RPM package relative path/location from repodata (<location href=”…”>).

Since: 5.0

get_media_number()
Return type:

int

Returns:

Number of media (usually a CD/DVD disc) on which the package is located.

Since: 5.0

get_na()
Return type:

string

Returns:

RPM package NA (Name.Arch).

Since: 5.0

get_name()
Return type:

string

Returns:

RPM package Name (RPMTAG_NAME).

Since: 5.0

get_nevra()
Return type:

string

Returns:

RPM package NEVRA (Name-Epoch:Version-Release.Arch). If the Epoch is 0, it is omitted from the output.

Since: 5.0

get_obsoletes()
Return type:

ReldepList

Returns:

List of RPM package Obsoletes (RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEFLAGS, RPMTAG_OBSOLETEVERSION).

Since: 5.0

get_package_path()
Return type:

string

Returns:

Path to the RPM package on the local file system: If the package is a local package, return its path If the package is a remote package downloaded to cache, return path to the cache If the package is a remote package that hasn’t been downloaded yet, return path to the cache

Since: 5.0

get_packager()
Return type:

string

Returns:

RPM package Packager (RPMTAG_PACKAGER).

Since: 5.0

get_prereq_ignoreinst()
get_provides()
Return type:

ReldepList

Returns:

List of RPM package Provides (RPMTAG_PROVIDENAME, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDEVERSION).

Since: 5.0

get_reason()
Return type:

int

Returns:

Resolved reason why a package was installed. A package can be installed due to multiple reasons, only the most significant is returned.

Since: 5.0

get_recommends()
Return type:

ReldepList

Returns:

List of RPM package Recommends (RPMTAG_RECOMMENDNAME, RPMTAG_RECOMMENDFLAGS, RPMTAG_RECOMMENDVERSION).

Since: 5.0

get_regular_requires()
get_release()
Return type:

string

Returns:

RPM package Release (RPMTAG_RELEASE).

Since: 5.0

get_remote_locations(*args)
Return type:

std::vector< std::string,std::allocator< std::string > >

Returns:

RPM package remote location where the package can be download from. Returns empty vector for installed and commandline packages.

Since: 5.1

get_repo()
Return type:

RepoWeakPtr

Returns:

A Repo object that represents the repository the package belongs to.

Since: 5.0 Notes: This isn’t the repository the package was installed from.

get_repo_id()
Return type:

string

Returns:

Id of the repository the package belongs to.

Since: 5.0 Notes: This isn’t the repository the package was installed from.

get_repo_name()
Return type:

string

Returns:

Name of the repository the package belongs to.

Since: 5.0.10 Notes: This isn’t the repository the package was installed from.

get_requires()
Return type:

ReldepList

Returns:

List of RPM package Requires (RPMTAG_REQUIRENAME, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIREVERSION).

Since: 5.0

get_requires_pre()
Return type:

ReldepList

Returns:

List of RPM package Requires(pre).

Since: 5.0

get_rpmdbid()
Return type:

int

Returns:

The rpmdb database id (primary key) of the installed RPM package.

Since: 5.0

get_source_name()
Return type:

string

Returns:

RPM package source name.

Since: 5.0

get_sourcerpm()
Return type:

string

Returns:

RPM package source package filename (RPMTAG_SOURCERPM).

Since: 5.0

get_suggests()
Return type:

ReldepList

Returns:

List of RPM package Suggests (RPMTAG_SUGGESTNAME, RPMTAG_SUGGESTFLAGS, RPMTAG_SUGGESTVERSION).

Since: 5.0

get_summary()
Return type:

string

Returns:

RPM package Summary (RPMTAG_SUMMARY).

Since: 5.0

get_supplements()
Return type:

ReldepList

Returns:

List of RPM package Supplements (RPMTAG_SUPPLEMENTNAME, RPMTAG_SUPPLEMENTFLAGS, RPMTAG_SUPPLEMENTVERSION).

Since: 5.0

get_url()
Return type:

string

Returns:

RPM package URL (project home address) (RPMTAG_URL).

Since: 5.0

get_vendor()
Return type:

string

Returns:

RPM package Vendor (RPMTAG_VENDOR).

Since: 5.0

get_version()
Return type:

string

Returns:

RPM package Version (RPMTAG_VERSION).

Since: 5.0

is_available_locally()
Return type:

boolean

Returns:

true if the package is available locally, false otherwise.

Since: 5.0.8

is_excluded()
Return type:

boolean

Returns:

true if the package is excluded, false otherwise.

Since: 5.0

is_installed()
Return type:

boolean

Returns:

true if the package is installed on the system, false otherwise.

Since: 5.0

thisown
to_string()

Return NEVRA -> 0 epoch is not shown in string

to_string_description()

Provide descriptive information about instance including NEVRA and ID

Checksum

class libdnf5.rpm.Checksum(*args)

Class contains checksum and checksum type

Type_MD5
Type_SHA1
Type_SHA224
Type_SHA256
Type_SHA384
Type_SHA512
Type_UNKNOWN
get_checksum()

Return checksum in hex format

get_type()
get_type_str()
thisown