libzypp
17.25.6
|
A Solvable object within the sat Pool. More...
#include <Solvable.h>
Classes | |
class | SplitIdent |
Helper that splits an identifier into kind and name or vice versa. More... | |
Public Types | |
typedef sat::detail::SolvableIdType | IdType |
Public Member Functions | |
Solvable () | |
Default ctor creates noSolvable. More... | |
Solvable (IdType id_r) | |
PoolImpl ctor. More... | |
operator bool () const | |
Evaluate Solvable in a boolean context (!= noSolvable ). More... | |
IdString | ident () const |
The identifier. More... | |
ResKind | kind () const |
The Solvables ResKind. More... | |
bool | isKind (const ResKind &kind_r) const |
Test whether a Solvable is of a certain ResKind. More... | |
template<class TRes > | |
bool | isKind () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
template<class TIterator > | |
bool | isKind (TIterator begin, TIterator end) const |
std::string | name () const |
The name (without any ResKind prefix). More... | |
Edition | edition () const |
The edition (version-release). More... | |
Arch | arch () const |
The architecture. More... | |
IdString | vendor () const |
The vendor. More... | |
Repository | repository () const |
The Repository this Solvable belongs to. More... | |
RepoInfo | repoInfo () const |
The repositories RepoInfo. More... | |
bool | isSystem () const |
Return whether this Solvable belongs to the system repo. More... | |
bool | onSystemByUser () const |
Whether this is known to be installed on behalf of a user request. More... | |
bool | onSystemByAuto () const |
Whether this is known to be automatically installed (as dependency of a user request package). More... | |
bool | identIsAutoInstalled () const |
Whether an installed solvable with the same ident is flagged as AutoInstalled. More... | |
bool | multiversionInstall () const |
Whether different versions of this package can be installed at the same time. More... | |
bool | isNeedreboot () const |
Whether this solvable triggers the reboot-needed hint if installed/updated. More... | |
bool | isRetracted () const |
Whether this solvable is retracted (provides retractedToken). More... | |
bool | isPtf () const |
Whether this solvable is a PTF (provides ptfToken). More... | |
Date | buildtime () const |
The items build time. More... | |
Date | installtime () const |
The items install time (false if not installed). More... | |
std::string | asString () const |
String representation "ident-edition.arch" or "noSolvable" . More... | |
std::string | asUserString () const |
String representation "ident-edition.arch(repo)" or "noSolvable" . More... | |
bool | identical (const Solvable &rhs) const |
Test whether two Solvables have the same content. More... | |
bool | sameNVRA (const Solvable &rhs) const |
Test for same name-version-release.arch. More... | |
Access to the \ref Solvable dependencies. | |
| |
Capabilities | provides () const |
Capabilities | requires () const |
Capabilities | conflicts () const |
Capabilities | obsoletes () const |
Capabilities | recommends () const |
Capabilities | suggests () const |
Capabilities | enhances () const |
Capabilities | supplements () const |
Capabilities | prerequires () const |
Capabilities | dep (Dep which_r) const |
Return Capabilities selected by Dep constant. More... | |
Capabilities | operator[] (Dep which_r) const |
CapabilitySet | providesNamespace (const std::string &namespace_r) const |
Return the namespaced provides 'namespace([value])[ op edition]' of this Solvable. More... | |
CapabilitySet | valuesOfNamespace (const std::string &namespace_r) const |
Return 'value[ op edition]' for namespaced provides 'namespace(value)[ op edition]' . More... | |
std::pair< bool, CapabilitySet > | matchesSolvable (const SolvAttr &attr, const sat::Solvable &solv) const |
Locale support. | |
bool | supportsLocales () const |
Whether this Solvable claims to support locales. More... | |
bool | supportsLocale (const Locale &locale_r) const |
Whether this Solvable supports a specific Locale. More... | |
bool | supportsLocale (const LocaleSet &locales_r) const |
Whether this Solvable supports at least one of the specified locales. More... | |
bool | supportsRequestedLocales () const |
Whether this Solvable supports at least one requested locale. More... | |
LocaleSet | getSupportedLocales () const |
Return the supported locales. More... | |
void | getSupportedLocales (LocaleSet &locales_r) const |
CpeId | cpeId () const |
The solvables CpeId if available. More... | |
unsigned | mediaNr () const |
Media number the solvable is located on (0 if no media access required). More... | |
ByteCount | installSize () const |
Installed (unpacked) size. More... | |
ByteCount | downloadSize () const |
Download size. More... | |
std::string | distribution () const |
The distribution string. More... | |
std::string | summary (const Locale &lang_r=Locale()) const |
Short (singleline) text describing the solvable (opt. More... | |
std::string | description (const Locale &lang_r=Locale()) const |
Long (multiline) text describing the solvable (opt. More... | |
std::string | insnotify (const Locale &lang_r=Locale()) const |
UI hint text when selecting the solvable for install (opt. More... | |
std::string | delnotify (const Locale &lang_r=Locale()) const |
UI hint text when selecting the solvable for uninstall (opt. More... | |
std::string | licenseToConfirm (const Locale &lang_r=Locale()) const |
License or agreement to accept before installing the solvable (opt. More... | |
bool | needToAcceptLicense () const |
True except for well known exceptions (i.e show license but no need to accept it). More... | |
Static Public Member Functions | |
static bool | identIsAutoInstalled (const IdString &ident_r) |
Static Public Attributes | |
static const IdString | retractedToken { "retracted-patch-package()" } |
Indicator provides retracted-patch-package() More... | |
static const IdString | ptfToken { "ptf()" } |
Indicator provides ptf() More... | |
static const Solvable | noSolvable |
Represents no Solvable. More... | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const Solvable &obj) |
Stream output. More... | |
std::ostream & | dumpOn (std::ostream &str, const Solvable &obj) |
More verbose stream output including dependencies. More... | |
std::ostream & | dumpAsXmlOn (std::ostream &str, const Solvable &obj) |
XML output. More... | |
bool | operator== (const Solvable &lhs, const Solvable &rhs) |
bool | operator!= (const Solvable &lhs, const Solvable &rhs) |
bool | operator< (const Solvable &lhs, const Solvable &rhs) |
template<class TRes > | |
bool | isKind (const Solvable &solvable_r) |
Test whether a Solvable is of a certain Kind. More... | |
bool | identical (const Solvable &lhs, const Solvable &rhs) |
Test for same content. More... | |
bool | sameNVRA (const Solvable &lhs, const Solvable &rhs) |
Test for same name version release and arch. More... | |
int | compareByN (const Solvable &lhs, const Solvable &rhs) |
Compare according to kind and name. More... | |
int | compareByNVR (const Solvable &lhs, const Solvable &rhs) |
Compare according to kind, name and edition. More... | |
int | compareByNVRA (const Solvable &lhs, const Solvable &rhs) |
Compare according to kind, name, edition and arch. More... | |
Attribute lookup. | |
| |
IdType | _id |
std::string | lookupStrAttribute (const SolvAttr &attr) const |
returns the string attribute value for attr or an empty string if it does not exists. More... | |
std::string | lookupStrAttribute (const SolvAttr &attr, const Locale &lang_r) const |
unsigned long long | lookupNumAttribute (const SolvAttr &attr) const |
returns the numeric attribute value for attr or 0 if it does not exists. More... | |
unsigned long long | lookupNumAttribute (const SolvAttr &attr, unsigned long long notfound_r) const |
bool | lookupBoolAttribute (const SolvAttr &attr) const |
returns the boolean attribute value for attr or false if it does not exists. More... | |
detail::IdType | lookupIdAttribute (const SolvAttr &attr) const |
returns the id attribute value for attr or detail::noId if it does not exists. More... | |
CheckSum | lookupCheckSumAttribute (const SolvAttr &attr) const |
returns the CheckSum attribute value for attr or an empty CheckSum if ir does not exist. More... | |
OnMediaLocation | lookupLocation () const |
returns OnMediaLocation data: This is everything we need to download e.g. More... | |
Solvable | nextInPool () const |
Return next Solvable in Pool (or noSolvable). More... | |
Solvable | nextInRepo () const |
Return next Solvable in Repo (or noSolvable). More... | |
detail::CSolvable * | get () const |
Expert backdoor. More... | |
IdType | id () const |
Expert backdoor. More... | |
Additional Inherited Members | |
![]() | |
static PoolImpl & | myPool () |
A Solvable object within the sat Pool.
"pattern:kde_multimedia"
, except for packages and source packes. They are not prefixed by any kind string. Instead the architecture is abused to store "src"
and "nosrc"
values.Solvable will hide this inconsistency by treating source packages as an own kind of solvable and map their arch to Arch_noarch.
Definition at line 53 of file Solvable.h.
Definition at line 56 of file Solvable.h.
|
inline |
Default ctor creates noSolvable.
Definition at line 63 of file Solvable.h.
|
inlineexplicit |
PoolImpl ctor.
Definition at line 68 of file Solvable.h.
|
inlineexplicit |
Evaluate Solvable in a boolean context (!=
noSolvable
).
Definition at line 77 of file Solvable.h.
IdString zypp::sat::Solvable::ident | ( | ) | const |
The identifier.
This is the solvables name, except for packages and source packes, prefixed by it's kind.
Definition at line 268 of file Solvable.cc.
ResKind zypp::sat::Solvable::kind | ( | ) | const |
The Solvables ResKind.
Definition at line 274 of file Solvable.cc.
Test whether a Solvable is of a certain ResKind.
The test is far cheaper than actually retrieving and comparing the kind.
Definition at line 301 of file Solvable.cc.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 97 of file Solvable.h.
|
inline |
Definition at line 101 of file Solvable.h.
std::string zypp::sat::Solvable::name | ( | ) | const |
The name (without any ResKind prefix).
Definition at line 328 of file Solvable.cc.
Edition zypp::sat::Solvable::edition | ( | ) | const |
The edition (version-release).
Definition at line 336 of file Solvable.cc.
Arch zypp::sat::Solvable::arch | ( | ) | const |
The architecture.
Definition at line 342 of file Solvable.cc.
IdString zypp::sat::Solvable::vendor | ( | ) | const |
The vendor.
Definition at line 356 of file Solvable.cc.
Repository zypp::sat::Solvable::repository | ( | ) | const |
The Repository this Solvable belongs to.
Definition at line 362 of file Solvable.cc.
RepoInfo zypp::sat::Solvable::repoInfo | ( | ) | const |
The repositories RepoInfo.
Definition at line 368 of file Solvable.cc.
bool zypp::sat::Solvable::isSystem | ( | ) | const |
Return whether this Solvable belongs to the system repo.
Definition at line 372 of file Solvable.cc.
bool zypp::sat::Solvable::onSystemByUser | ( | ) | const |
Whether this is known to be installed on behalf of a user request.
false
for non-system (uninstalled) solvables. Definition at line 378 of file Solvable.cc.
bool zypp::sat::Solvable::onSystemByAuto | ( | ) | const |
Whether this is known to be automatically installed (as dependency of a user request package).
false
for non-system (uninstalled) solvables. Definition at line 383 of file Solvable.cc.
|
inline |
Whether an installed solvable with the same ident is flagged as AutoInstalled.
Definition at line 137 of file Solvable.h.
Definition at line 388 of file Solvable.cc.
bool zypp::sat::Solvable::multiversionInstall | ( | ) | const |
Whether different versions of this package can be installed at the same time.
Per default false
.
Definition at line 415 of file Solvable.cc.
bool zypp::sat::Solvable::isNeedreboot | ( | ) | const |
Whether this solvable triggers the reboot-needed hint if installed/updated.
Definition at line 393 of file Solvable.cc.
bool zypp::sat::Solvable::isRetracted | ( | ) | const |
Whether this solvable is retracted (provides retractedToken).
Definition at line 399 of file Solvable.cc.
bool zypp::sat::Solvable::isPtf | ( | ) | const |
Whether this solvable is a PTF (provides ptfToken).
Definition at line 409 of file Solvable.cc.
Date zypp::sat::Solvable::buildtime | ( | ) | const |
The items build time.
Definition at line 421 of file Solvable.cc.
Date zypp::sat::Solvable::installtime | ( | ) | const |
The items install time (false
if not installed).
Definition at line 427 of file Solvable.cc.
std::string zypp::sat::Solvable::asString | ( | ) | const |
String representation "ident-edition.arch"
or "noSolvable"
.
Definition at line 433 of file Solvable.cc.
std::string zypp::sat::Solvable::asUserString | ( | ) | const |
String representation "ident-edition.arch(repo)"
or "noSolvable"
.
Definition at line 442 of file Solvable.cc.
Test whether two Solvables have the same content.
Basically the same name, edition, arch, vendor and buildtime.
Definition at line 452 of file Solvable.cc.
Test for same name-version-release.arch.
Definition at line 181 of file Solvable.h.
Capabilities zypp::sat::Solvable::provides | ( | ) | const |
Definition at line 469 of file Solvable.cc.
Capabilities zypp::sat::Solvable::requires | ( | ) | const |
Definition at line 474 of file Solvable.cc.
Capabilities zypp::sat::Solvable::conflicts | ( | ) | const |
Definition at line 479 of file Solvable.cc.
Capabilities zypp::sat::Solvable::obsoletes | ( | ) | const |
Definition at line 484 of file Solvable.cc.
Capabilities zypp::sat::Solvable::recommends | ( | ) | const |
Definition at line 489 of file Solvable.cc.
Capabilities zypp::sat::Solvable::suggests | ( | ) | const |
Definition at line 494 of file Solvable.cc.
Capabilities zypp::sat::Solvable::enhances | ( | ) | const |
Definition at line 499 of file Solvable.cc.
Capabilities zypp::sat::Solvable::supplements | ( | ) | const |
Definition at line 504 of file Solvable.cc.
Capabilities zypp::sat::Solvable::prerequires | ( | ) | const |
Definition at line 509 of file Solvable.cc.
|
inline |
Return Capabilities selected by Dep constant.
Definition at line 201 of file Solvable.h.
|
inline |
Definition at line 218 of file Solvable.h.
CapabilitySet zypp::sat::Solvable::providesNamespace | ( | const std::string & | namespace_r | ) | const |
Return the namespaced provides 'namespace([value])[ op edition]'
of this Solvable.
Definition at line 518 of file Solvable.cc.
CapabilitySet zypp::sat::Solvable::valuesOfNamespace | ( | const std::string & | namespace_r | ) | const |
Return 'value[ op edition]'
for namespaced provides 'namespace(value)[ op edition]'
.
Similar to providesNamespace, but the namespace is stripped from the dependencies. This is convenient if the namespace denotes packages that should be looked up. E.g. the weakremover
namespace used in a products release package denotes the packages that were dropped from the distribution.
Definition at line 532 of file Solvable.cc.
std::pair< bool, CapabilitySet > zypp::sat::Solvable::matchesSolvable | ( | const SolvAttr & | attr, |
const sat::Solvable & | solv | ||
) | const |
Definition at line 550 of file Solvable.cc.
bool zypp::sat::Solvable::supportsLocales | ( | ) | const |
Whether this Solvable
claims to support locales.
Definition at line 639 of file Solvable.cc.
Whether this Solvable
supports a specific Locale.
Definition at line 645 of file Solvable.cc.
Whether this Solvable
supports at least one of the specified locales.
Definition at line 651 of file Solvable.cc.
bool zypp::sat::Solvable::supportsRequestedLocales | ( | ) | const |
Whether this Solvable
supports at least one requested locale.
Definition at line 659 of file Solvable.cc.
LocaleSet zypp::sat::Solvable::getSupportedLocales | ( | ) | const |
Return the supported locales.
Definition at line 662 of file Solvable.cc.
|
inline |
Definition at line 253 of file Solvable.h.
CpeId zypp::sat::Solvable::cpeId | ( | ) | const |
The solvables CpeId if available.
Definition at line 669 of file Solvable.cc.
unsigned zypp::sat::Solvable::mediaNr | ( | ) | const |
Media number the solvable is located on (0
if no media access required).
Definition at line 675 of file Solvable.cc.
ByteCount zypp::sat::Solvable::installSize | ( | ) | const |
Installed (unpacked) size.
This is just a total number. Many objects provide even more detailed disk usage data. You can use DiskUsageCounter to find out how objects data are distributed across partitions/directories.
Definition at line 688 of file Solvable.cc.
ByteCount zypp::sat::Solvable::downloadSize | ( | ) | const |
Download size.
Definition at line 694 of file Solvable.cc.
std::string zypp::sat::Solvable::distribution | ( | ) | const |
The distribution string.
Definition at line 700 of file Solvable.cc.
Short (singleline) text describing the solvable (opt.
translated).
Definition at line 706 of file Solvable.cc.
Long (multiline) text describing the solvable (opt.
translated).
Definition at line 712 of file Solvable.cc.
UI hint text when selecting the solvable for install (opt.
translated).
Definition at line 718 of file Solvable.cc.
UI hint text when selecting the solvable for uninstall (opt.
translated).
Definition at line 724 of file Solvable.cc.
License or agreement to accept before installing the solvable (opt.
translated).
Definition at line 730 of file Solvable.cc.
bool zypp::sat::Solvable::needToAcceptLicense | ( | ) | const |
True
except for well known exceptions (i.e show license but no need to accept it).
Definition at line 747 of file Solvable.cc.
std::string zypp::sat::Solvable::lookupStrAttribute | ( | const SolvAttr & | attr | ) | const |
returns the string attribute value for attr or an empty string if it does not exists.
Definition at line 129 of file Solvable.cc.
std::string zypp::sat::Solvable::lookupStrAttribute | ( | const SolvAttr & | attr, |
const Locale & | lang_r | ||
) | const |
Definition at line 136 of file Solvable.cc.
unsigned long long zypp::sat::Solvable::lookupNumAttribute | ( | const SolvAttr & | attr | ) | const |
returns the numeric attribute value for attr or 0 if it does not exists.
Definition at line 157 of file Solvable.cc.
unsigned long long zypp::sat::Solvable::lookupNumAttribute | ( | const SolvAttr & | attr, |
unsigned long long | notfound_r | ||
) | const |
Definition at line 163 of file Solvable.cc.
returns the boolean attribute value for attr or false
if it does not exists.
Definition at line 169 of file Solvable.cc.
detail::IdType zypp::sat::Solvable::lookupIdAttribute | ( | const SolvAttr & | attr | ) | const |
returns the id attribute value for attr or detail::noId if it does not exists.
Definition at line 175 of file Solvable.cc.
returns the CheckSum attribute value for attr or an empty CheckSum if ir does not exist.
Definition at line 181 of file Solvable.cc.
OnMediaLocation zypp::sat::Solvable::lookupLocation | ( | ) | const |
returns OnMediaLocation data: This is everything we need to download e.g.
an rpm (path, checksum, downloadsize, etc.).
Definition at line 223 of file Solvable.cc.
Solvable zypp::sat::Solvable::nextInPool | ( | ) | const |
Return next Solvable in Pool (or noSolvable).
Definition at line 112 of file Solvable.cc.
Solvable zypp::sat::Solvable::nextInRepo | ( | ) | const |
Return next Solvable in Repo (or noSolvable).
Definition at line 115 of file Solvable.cc.
detail::CSolvable * zypp::sat::Solvable::get | ( | ) | const |
Expert backdoor.
Definition at line 105 of file Solvable.cc.
|
inline |
Expert backdoor.
Definition at line 399 of file Solvable.h.
|
related |
Stream output.
Definition at line 763 of file Solvable.cc.
|
related |
More verbose stream output including dependencies.
Definition at line 774 of file Solvable.cc.
|
related |
XML output.
Definition at line 794 of file Solvable.cc.
Definition at line 416 of file Solvable.h.
Definition at line 420 of file Solvable.h.
Definition at line 424 of file Solvable.h.
Test whether a Solvable is of a certain Kind.
Definition at line 429 of file Solvable.h.
Test for same content.
Definition at line 433 of file Solvable.h.
Test for same name version release and arch.
Definition at line 437 of file Solvable.h.
Compare according to kind and name.
Definition at line 442 of file Solvable.h.
Compare according to kind, name and edition.
Definition at line 454 of file Solvable.h.
Compare according to kind, name, edition and arch.
Definition at line 463 of file Solvable.h.
|
static |
Indicator provides retracted-patch-package()
Definition at line 58 of file Solvable.h.
|
static |
Indicator provides ptf()
Definition at line 59 of file Solvable.h.
|
static |
Represents no Solvable.
Definition at line 74 of file Solvable.h.
|
private |
Definition at line 402 of file Solvable.h.