Package
-
class Package
Public Functions
-
std::string get_name() const
- Since
5.0
- Returns
RPM package Name (
RPMTAG_NAME
).
-
std::string get_epoch() const
- Since
5.0
- Returns
RPM package Epoch (
RPMTAG_EPOCH
).
-
std::string get_version() const
- Since
5.0
- Returns
RPM package Version (
RPMTAG_VERSION
).
-
std::string get_release() const
- Since
5.0
- Returns
RPM package Release (
RPMTAG_RELEASE
).
-
std::string get_arch() const
- Since
5.0
- Returns
RPM package Arch (
RPMTAG_ARCH
).
-
std::string get_evr() const
- Since
5.0
- Returns
RPM package EVR (Epoch:Version-Release). If the Epoch is 0, it is omitted from the output.
-
std::string get_nevra() const
- Since
5.0
- Returns
RPM package NEVRA (Name-Epoch:Version-Release.Arch). If the Epoch is 0, it is omitted from the output.
-
std::string get_full_nevra() const
- Since
5.0
- Returns
RPM package NEVRA (Name-Epoch:Version-Release.Arch). The Epoch is always present even if it is 0.
-
std::string get_na() const
- Since
5.0
- Returns
RPM package NA (Name.Arch).
-
std::string get_group() const
- Since
5.0
- Returns
RPM package Group (
RPMTAG_GROUP
).
-
unsigned long long get_package_size() const
- Since
5.0
- Returns
File size of the RPM package.
-
unsigned long long get_install_size() const
- Since
5.0
Note
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.
- 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.
-
std::string get_license() const
- Since
5.0
- Returns
RPM package License (
RPMTAG_LICENSE
).
-
std::string get_source_name() const
- Since
5.0
- Returns
RPM package source name.
-
std::string get_sourcerpm() const
- Since
5.0
- Returns
RPM package source package filename (
RPMTAG_SOURCERPM
).
-
unsigned long long get_build_time() const
- Since
5.0
- Returns
RPM package build timestamp (
RPMTAG_BUILDTIME
).
-
std::string get_packager() const
- Since
5.0
- Returns
RPM package Packager (
RPMTAG_PACKAGER
).
-
std::string get_vendor() const
- Since
5.0
- Returns
RPM package Vendor (
RPMTAG_VENDOR
).
-
std::string get_url() const
- Since
5.0
- Returns
RPM package URL (project home address) (
RPMTAG_URL
).
-
std::string get_summary() const
- Since
5.0
- Returns
RPM package Summary (
RPMTAG_SUMMARY
).
-
std::string get_description() const
- Since
5.0
- Returns
RPM package Description (
RPMTAG_DESCRIPTION
).
-
ReldepList get_provides() const
- Since
5.0
- Returns
List of RPM package Provides (
RPMTAG_PROVIDENAME
,RPMTAG_PROVIDEFLAGS
,RPMTAG_PROVIDEVERSION
).
-
ReldepList get_requires() const
- Since
5.0
- Returns
List of RPM package Requires (
RPMTAG_REQUIRENAME
,RPMTAG_REQUIREFLAGS
,RPMTAG_REQUIREVERSION
).
-
ReldepList get_requires_pre() const
- Since
5.0
- Returns
List of RPM package Requires(pre).
-
ReldepList get_conflicts() const
- Since
5.0
- Returns
List of RPM package Conflicts (
RPMTAG_CONFLICTNAME
,RPMTAG_CONFLICTFLAGS
,RPMTAG_CONFLICTVERSION
).
-
ReldepList get_obsoletes() const
- Since
5.0
- Returns
List of RPM package Obsoletes (
RPMTAG_OBSOLETENAME
,RPMTAG_OBSOLETEFLAGS
,RPMTAG_OBSOLETEVERSION
).
-
ReldepList get_recommends() const
- Since
5.0
- Returns
List of RPM package Recommends (
RPMTAG_RECOMMENDNAME
,RPMTAG_RECOMMENDFLAGS
,RPMTAG_RECOMMENDVERSION
).
-
ReldepList get_suggests() const
- Since
5.0
- Returns
List of RPM package Suggests (
RPMTAG_SUGGESTNAME
,RPMTAG_SUGGESTFLAGS
,RPMTAG_SUGGESTVERSION
).
-
ReldepList get_enhances() const
- Since
5.0
- Returns
List of RPM package Enhances (
RPMTAG_ENHANCENAME
,RPMTAG_ENHANCEFLAGS
,RPMTAG_ENHANCEVERSION
).
-
ReldepList get_supplements() const
- Since
5.0
- Returns
List of RPM package Supplements (
RPMTAG_SUPPLEMENTNAME
,RPMTAG_SUPPLEMENTFLAGS
,RPMTAG_SUPPLEMENTVERSION
).
-
std::vector<std::string> get_files() const
- Since
5.0
Note
Information whether the returned files are actual files, directories or ghosted files is not available.
- Returns
List of files and directories the RPM package contains (
RPMTAG_FILENAMES
). If file lists are not loaded, empty list is returned.
-
std::vector<Changelog> get_changelogs() const
- Since
5.0
- Returns
List of package changelog entries. If
other
repository metadata are
-
std::string get_baseurl() const
- Since
5.0
- Returns
RPM package baseurl from repodata (
<location xml:base="...">
).
-
std::string get_location() const
- Since
5.0
- Returns
RPM package relative path/location from repodata (
<location href="...">
).
-
Checksum get_checksum() const
- Since
5.0
- Returns
Checksum object representing RPM package checksum and its type (
<checksum type="type">checksum</checksum>
).
-
Checksum get_hdr_checksum() const
- Since
5.0
- Returns
Checksum object representing RPM package header checksum and its type.
-
unsigned long long get_hdr_end() const
- Since
5.0
- Returns
RPM package header end (the header is located between file position 0 and the returned offset).
-
unsigned long long get_media_number() const
- Since
5.0
- Returns
Number of media (usually a CD/DVD disc) on which the package is located.
-
std::string get_package_path() const
- Since
5.0
- 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
-
bool is_installed() const
- Since
5.0
- Returns
true
if the package is installed on the system,false
otherwise.
-
bool is_excluded() const
- Since
5.0
- Returns
true
if the package is excluded,false
otherwise.
-
unsigned long long get_install_time() const
TODO is_local.
TODO get_from_repo_id - requires swdb For an installed package, return id of repo from the package was installed. For an available package, return an empty string.
- Returns
The unix timestamp (seconds since epoch) of when the package was installed. Return 0 if the package is not installed.
-
unsigned long long get_rpmdbid() const
- Since
5.0
- Returns
The rpmdb database id (primary key) of the installed RPM package.
-
libdnf::repo::RepoWeakPtr get_repo() const
- Since
5.0
Note
This isn’t the repository the package was installed from.
- Returns
A
Repo
object that represents the repository the package belongs to.
-
std::string get_repo_id() const
- Since
5.0
Note
This isn’t the repository the package was installed from.
- Returns
Id of the repository the package belongs to.
-
libdnf::transaction::TransactionItemReason get_reason() const
- Since
5.0
- Returns
Resolved reason why a package was installed. A package can be installed due to multiple reasons, only the most significant is returned.
-
std::string get_name() const