12#ifndef ZYPP_SAT_SOLVABLE_H
13#define ZYPP_SAT_SOLVABLE_H
35 class OnMediaLocation;
65 :
_id( detail::noSolvableId )
78 explicit operator bool()
const
99 {
return isKind( resKind<TRes>() ); }
101 template<
class TIterator>
102 bool isKind( TIterator begin, TIterator end )
const
103 {
for_( it, begin, end )
if (
isKind( *it ) )
return true;
return false; }
106 std::string
name()
const;
248 {
return dep( which_r ); }
446 {
return lhs.
get() == rhs.
get(); }
450 {
return lhs.
get() != rhs.
get(); }
454 {
return lhs.
get() < rhs.
get(); }
477 res = lhs.
name().compare( rhs.
name() );
513 , boost::forward_traversal_tag
int compare(const Arch &rhs) const
Arch comparison.
Store and operate with byte count.
Convenience char* constructible from std::string and char*, it maps (char*)0 to an empty string.
Container of Capability (currently read only).
Common Platform Enumearation (2.3) See http://cpe.mitre.org/ for more information on the Common Platf...
Store and operate on date (time_t).
Edition represents [epoch:]version[-release]
static int compare(const Derived &lhs, const Derived &rhs)
Access to the sat-pools string space.
'Language[_Country]' codes.
Combining sat::Solvable and ResStatus.
What is known about a repository.
Helper that splits an identifier into kind and name or vice versa.
A Solvable object within the sat Pool.
Capabilities suggests() const
IdType id() const
Expert backdoor.
bool isKind(const Solvable &solvable_r)
Test whether a Solvable is of a certain Kind.
bool isPtfPackage() const
Subset of isPtf (provides ptfPackageToken).
bool isNeedreboot() const
Whether this solvable triggers the reboot-needed hint if installed/updated.
bool identIsAutoInstalled() const
Whether an installed solvable with the same ident is flagged as AutoInstalled.
OnMediaLocation lookupLocation() const
returns OnMediaLocation data: This is everything we need to download e.g.
bool isKind(TIterator begin, TIterator end) const
Capabilities dep(Dep which_r) const
Return Capabilities selected by Dep constant.
bool identical(const Solvable &lhs, const Solvable &rhs)
Test for same content.
bool lookupBoolAttribute(const SolvAttr &attr) const
returns the boolean attribute value for attr or false if it does not exists.
int compareByNVR(const Solvable &lhs, const Solvable &rhs)
Compare according to kind, name and edition.
IdString vendor() const
The vendor.
void getSupportedLocales(LocaleSet &locales_r) const
ByteCount installSize() const
Installed (unpacked) size.
Date buildtime() const
The items build time.
bool needToAcceptLicense() const
True except for well known exceptions (i.e show license but no need to accept it).
ResKind kind() const
The Solvables ResKind.
CapabilitySet providesNamespace(const std::string &namespace_r) const
Return the namespaced provides 'namespace([value])[ op edition]' of this Solvable.
static const Solvable noSolvable
Represents no Solvable.
std::string asString() const
String representation "ident-edition.arch" or "noSolvable".
std::string distribution() const
The distribution string.
unsigned mediaNr() const
Media number the solvable is located on (0 if no media access required).
bool isBlacklisted() const
Whether this solvable is blacklisted (retracted,ptf,...).
unsigned long long lookupNumAttribute(const SolvAttr &attr) const
returns the numeric attribute value for attr or 0 if it does not exists.
std::string lookupStrAttribute(const SolvAttr &attr) const
returns the string attribute value for attr or an empty string if it does not exists.
bool multiversionInstall() const
Whether different versions of this package can be installed at the same time.
int compareByN(const Solvable &lhs, const Solvable &rhs)
Compare according to kind and name.
CpeId cpeId() const
The solvables CpeId if available.
Solvable nextInRepo() const
Return next Solvable in Repo (or noSolvable).
Capabilities operator[](Dep which_r) const
Date installtime() const
The items install time (false if not installed).
Edition edition() const
The edition (version-release).
bool sameNVRA(const Solvable &rhs) const
Test for same name-version-release.arch.
static const IdString ptfMasterToken
Indicator provides ptf()
Capabilities prerequires() const
bool isPtfMaster() const
Subset of isPtf (provides ptfMasterToken).
Solvable()
Default ctor creates noSolvable.
Capabilities enhances() const
LocaleSet getSupportedLocales() const
Return the supported locales.
bool supportsRequestedLocales() const
Whether this Solvable supports at least one requested locale.
Solvable(IdType id_r)
PoolImpl ctor.
bool operator==(const Solvable &lhs, const Solvable &rhs)
detail::CSolvable * get() const
Expert backdoor.
Arch arch() const
The architecture.
static const IdString ptfPackageToken
Indicator provides ptf-package()
bool isSystem() const
Return whether this Solvable belongs to the system repo.
Solvable nextInPool() const
Return next Solvable in Pool (or noSolvable).
std::string licenseToConfirm(const Locale &lang_r=Locale()) const
License or agreement to accept before installing the solvable (opt.
bool operator!=(const Solvable &lhs, const Solvable &rhs)
bool supportsLocales() const
Whether this Solvable claims to support locales.
Capabilities provides() const
std::string asUserString() const
String representation "ident-edition.arch(repo)" or "noSolvable".
static const IdString retractedToken
Indicator provides retracted-patch-package()
bool sameNVRA(const Solvable &lhs, const Solvable &rhs)
Test for same name version release and arch.
std::string summary(const Locale &lang_r=Locale()) const
Short (singleline) text describing the solvable (opt.
Capabilities conflicts() const
Capabilities obsoletes() const
detail::IdType lookupIdAttribute(const SolvAttr &attr) const
returns the id attribute value for attr or detail::noId if it does not exists.
std::pair< bool, CapabilitySet > matchesSolvable(const SolvAttr &attr, const sat::Solvable &solv) const
std::string name() const
The name (without any ResKind prefix).
sat::detail::SolvableIdType IdType
bool supportsLocale(const Locale &locale_r) const
Whether this Solvable supports a specific Locale.
Capabilities supplements() const
ByteCount downloadSize() const
Download size.
bool isKind(const ResKind &kind_r) const
Test whether a Solvable is of a certain ResKind.
bool operator<(const Solvable &lhs, const Solvable &rhs)
bool onSystemByAuto() const
Whether this is known to be automatically installed (as dependency of a user request package).
std::string delnotify(const Locale &lang_r=Locale()) const
UI hint text when selecting the solvable for uninstall (opt.
CapabilitySet valuesOfNamespace(const std::string &namespace_r) const
Return 'value[ op edition]' for namespaced provides 'namespace(value)[ op edition]'.
IdString ident() const
The identifier.
CheckSum lookupCheckSumAttribute(const SolvAttr &attr) const
returns the CheckSum attribute value for attr or an empty CheckSum if ir does not exist.
std::string description(const Locale &lang_r=Locale()) const
Long (multiline) text describing the solvable (opt.
bool onSystemByUser() const
Whether this is known to be installed on behalf of a user request.
Capabilities recommends() const
int compareByNVRA(const Solvable &lhs, const Solvable &rhs)
Compare according to kind, name, edition and arch.
RepoInfo repoInfo() const
The repositories RepoInfo.
Repository repository() const
The Repository this Solvable belongs to.
bool isPtf() const
Whether this solvable belongs to a PTF (provides ptfMasterToken or ptfPackageToken).
bool isRetracted() const
Whether this solvable is retracted (provides retractedToken).
bool isKind() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::string insnotify(const Locale &lang_r=Locale()) const
UI hint text when selecting the solvable for install (opt.
bool identical(const Solvable &rhs) const
Test whether two Solvables have the same content.
Iterate over valid Solvables in the pool.
void initialAssignVal(const Solvable &val_r)
SolvableIterator(SolvableIdType id_r)
Solvable dereference() const
void assignVal(const Solvable &val_r)
SolvableIterator(const Solvable &val_r)
friend class boost::iterator_core_access
String related utilities and Regular expression matching.
int IdType
Generic Id type.
::s_Solvable CSolvable
Wrapped libsolv C data type exposed as backdoor.
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
bool compareByNVR(const SolvableType< Derived > &lhs, const Solvable &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
std::ostream & dumpOn(std::ostream &str, const LocaleSupport &obj)
std::ostream & dumpAsXmlOn(std::ostream &str, const FileConflicts &obj)
bool compareByN(const SolvableType< Derived > &lhs, const Solvable &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Easy-to use interface to the ZYPP dependency resolver.
std::unordered_set< Capability > CapabilitySet
std::unordered_set< Locale > LocaleSet
Enumeration class of dependency types.
for_use_in_switch inSwitch() const
Enumarator provided for use in switch statement.
To Solvable transform functor.
Solvable operator()(const Solvable &solv_r) const
Backlink to the associated PoolImpl.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
#define ZYPP_DEFINE_ID_HASHABLE(C)
Define hash function for id based classes.