libzypp
14.48.5
|
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... | |
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... | |
Repository | repository () const |
The Repository this Solvable belongs to. More... | |
IdString | ident () const |
The identifier. More... | |
ResKind | kind () const |
bool | isKind (const ResKind &kind_r) const |
Test whether a Solvable is of a certain ResKind. More... | |
template<class _Res > | |
bool | isKind () const |
template<class _Iterator > | |
bool | isKind (_Iterator begin, _Iterator end) |
std::string | name () const |
Edition | edition () const |
Arch | arch () const |
IdString | vendor () const |
bool | multiversionInstall () const |
Whether different versions of this package can be installed at the same time. 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 (Solvable rhs) const |
Test whether two Solvables have the same content. More... | |
bool | sameNVRA (Solvable rhs) const |
Test for same name-version-release.arch. 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... | |
Attribute lookup. | |
| |
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... | |
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... | |
Access to the \ref Solvable dependencies. | |
| |
Capabilities | operator[] (Dep which_r) const |
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 |
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... | |
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... | |
void | getSupportedLocales (LocaleSet &locales_r) const |
Return the supported locales via locales_r. More... | |
LocaleSet | getSupportedLocales () const |
Static Public Attributes | |
static const Solvable | noSolvable |
Represents no Solvable. More... | |
Private Attributes | |
IdType | _id |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const Solvable &obj) |
std::ostream & | dumpOn (std::ostream &str, const Solvable &obj) |
std::ostream & | dumpAsXmlOn (std::ostream &str, const Solvable &obj) |
bool | operator== (const Solvable &lhs, const Solvable &rhs) |
bool | operator!= (const Solvable &lhs, const Solvable &rhs) |
bool | operator< (const Solvable &lhs, const Solvable &rhs) |
bool | identical (Solvable lhs, Solvable rhs) |
bool | sameNVRA (Solvable lhs, Solvable rhs) |
int | compareByN (const Solvable &lhs, const Solvable &rhs) |
int | compareByNVR (const Solvable &lhs, const Solvable &rhs) |
int | compareByNVRA (const Solvable &lhs, const Solvable &rhs) |
template<class _Res > | |
bool | isKind (const sat::Solvable &solvable_r) |
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 55 of file Solvable.h.
Definition at line 58 of file Solvable.h.
|
inline |
Default ctor creates noSolvable.
Definition at line 62 of file Solvable.h.
|
inlineexplicit |
PoolImpl ctor.
Definition at line 66 of file Solvable.h.
|
inlineexplicit |
Evaluate Solvable in a boolean context (!=
noSolvable
).
Definition at line 74 of file Solvable.h.
bool zypp::sat::Solvable::isSystem | ( | ) | const |
Return whether this Solvable belongs to the system repo.
Definition at line 127 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, or if no history is available. Definition at line 133 of file Solvable.cc.
Repository zypp::sat::Solvable::repository | ( | ) | const |
The Repository this Solvable belongs to.
Definition at line 121 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 144 of file Solvable.cc.
std::string zypp::sat::Solvable::lookupStrAttribute | ( | const SolvAttr & | attr, |
const Locale & | lang_r | ||
) | const |
Definition at line 151 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 170 of file Solvable.cc.
returns the boolean attribute value for attr or false
if it does not exists.
Definition at line 176 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 182 of file Solvable.cc.
returns the CheckSum attribute value for attr or an empty CheckSum if ir does not exist.
Definition at line 188 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 230 of file Solvable.cc.
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 138 of file Solvable.cc.
ResKind zypp::sat::Solvable::kind | ( | ) | const |
Definition at line 274 of file Solvable.cc.
Test whether a Solvable is of a certain ResKind.
The test is far cheaper than actually retriveing 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 162 of file Solvable.h.
|
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 166 of file Solvable.h.
std::string zypp::sat::Solvable::name | ( | ) | const |
Definition at line 328 of file Solvable.cc.
Edition zypp::sat::Solvable::edition | ( | ) | const |
Definition at line 336 of file Solvable.cc.
Arch zypp::sat::Solvable::arch | ( | ) | const |
Definition at line 342 of file Solvable.cc.
IdString zypp::sat::Solvable::vendor | ( | ) | const |
Definition at line 361 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 356 of file Solvable.cc.
std::string zypp::sat::Solvable::asString | ( | ) | const |
String representation "ident-edition.arch"
or "noSolvable"
.
Definition at line 470 of file Solvable.cc.
std::string zypp::sat::Solvable::asUserString | ( | ) | const |
String representation "ident-edition.arch(repo)"
or "noSolvable"
.
Definition at line 479 of file Solvable.cc.
Test whether two Solvables have the same content.
Basically the same name, edition, arch, vendor and buildtime.
Definition at line 489 of file Solvable.cc.
Test for same name-version-release.arch.
Definition at line 198 of file Solvable.h.
Capabilities zypp::sat::Solvable::operator[] | ( | Dep | which_r | ) | const |
Definition at line 367 of file Solvable.cc.
Capabilities zypp::sat::Solvable::provides | ( | ) | const |
Definition at line 388 of file Solvable.cc.
Capabilities zypp::sat::Solvable::requires | ( | ) | const |
Definition at line 393 of file Solvable.cc.
Capabilities zypp::sat::Solvable::conflicts | ( | ) | const |
Definition at line 398 of file Solvable.cc.
Capabilities zypp::sat::Solvable::obsoletes | ( | ) | const |
Definition at line 403 of file Solvable.cc.
Capabilities zypp::sat::Solvable::recommends | ( | ) | const |
Definition at line 408 of file Solvable.cc.
Capabilities zypp::sat::Solvable::suggests | ( | ) | const |
Definition at line 413 of file Solvable.cc.
Capabilities zypp::sat::Solvable::enhances | ( | ) | const |
Definition at line 418 of file Solvable.cc.
Capabilities zypp::sat::Solvable::supplements | ( | ) | const |
Definition at line 423 of file Solvable.cc.
Capabilities zypp::sat::Solvable::prerequires | ( | ) | const |
Definition at line 428 of file Solvable.cc.
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 437 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 451 of file Solvable.cc.
bool zypp::sat::Solvable::supportsLocales | ( | ) | const |
Whether this Solvable
claims to support locales.
Definition at line 573 of file Solvable.cc.
Whether this Solvable
supports a specific Locale.
Definition at line 579 of file Solvable.cc.
Whether this Solvable
supports at least one of the specified locales.
Definition at line 585 of file Solvable.cc.
bool zypp::sat::Solvable::supportsRequestedLocales | ( | ) | const |
Whether this Solvable
supports at least one requested locale.
Definition at line 593 of file Solvable.cc.
void zypp::sat::Solvable::getSupportedLocales | ( | LocaleSet & | locales_r | ) | const |
Return the supported locales via locales_r.
Definition at line 596 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 249 of file Solvable.h.
Solvable zypp::sat::Solvable::nextInPool | ( | ) | const |
Return next Solvable in Pool (or noSolvable).
Definition at line 104 of file Solvable.cc.
Solvable zypp::sat::Solvable::nextInRepo | ( | ) | const |
Return next Solvable in Repo (or noSolvable).
Definition at line 107 of file Solvable.cc.
detail::CSolvable * zypp::sat::Solvable::get | ( | ) | const |
Expert backdoor.
Definition at line 97 of file Solvable.cc.
|
inline |
Expert backdoor.
Definition at line 288 of file Solvable.h.
|
related |
Stream output
Definition at line 607 of file Solvable.cc.
|
related |
More verbose stream output including dependencies
Definition at line 623 of file Solvable.cc.
|
related |
XML output
Definition at line 643 of file Solvable.cc.
Definition at line 305 of file Solvable.h.
Definition at line 309 of file Solvable.h.
Definition at line 313 of file Solvable.h.
Test for same content.
Definition at line 317 of file Solvable.h.
Test for same name version release and arch.
Definition at line 321 of file Solvable.h.
Compare according to kind and name.
Definition at line 326 of file Solvable.h.
Compare according to kind, name and edition.
Definition at line 338 of file Solvable.h.
Compare according to kind, name, edition and arch.
Definition at line 347 of file Solvable.h.
|
related |
Test whether a sat::Solvable is of a certain Kind.
Definition at line 410 of file Solvable.h.
|
static |
Represents no Solvable.
Definition at line 71 of file Solvable.h.
|
private |
Definition at line 291 of file Solvable.h.