12 #ifndef ZYPP_SAT_SOLVABLE_H 13 #define ZYPP_SAT_SOLVABLE_H 35 class OnMediaLocation;
86 explicit operator bool()
const 107 {
return isKind( resKind<TRes>() ); }
109 template<
class TIterator>
110 bool isKind( TIterator begin, TIterator end )
const 111 {
for_( it, begin, end )
if (
isKind( *it ) )
return true;
return false; }
114 std::string name()
const;
133 bool isSystem()
const;
138 bool onSystemByUser()
const;
143 bool onSystemByAuto()
const;
147 {
return identIsAutoInstalled( ident() ); }
149 static bool identIsAutoInstalled(
const IdString & ident_r );
154 bool multiversionInstall()
const;
157 bool isNeedreboot()
const;
161 {
return dep_provides().findFirstMatch(
Capability(patternToken.
id()) ); }
165 {
return bool(patternProvides()); }
169 {
return dep_provides().findFirstMatch(
Capability(productToken.
id()) ); }
173 {
return bool(productProvides()); }
194 bool isBlacklisted()
const;
197 bool isRetracted()
const;
203 bool isPtfMaster()
const;
206 bool isPtfPackage()
const;
210 Date buildtime()
const;
213 Date installtime()
const;
235 {
return(
get() == rhs.
get() || ( ident() == rhs.
ident() && edition() == rhs.
edition() && arch() == rhs.
arch() ) ); }
253 #if __cplusplus < 202002L 284 {
return dep( which_r ); }
288 CapabilitySet providesNamespace(
const std::string & namespace_r )
const;
297 CapabilitySet valuesOfNamespace(
const std::string & namespace_r )
const;
306 bool supportsLocales()
const;
308 bool supportsLocale(
const Locale & locale_r )
const;
310 bool supportsLocale(
const LocaleSet & locales_r )
const;
314 bool supportsRequestedLocales()
const;
319 { locales_r = getSupportedLocales(); }
327 unsigned mediaNr()
const;
356 std::string distribution()
const;
359 std::string summary(
const Locale & lang_r =
Locale() )
const;
362 std::string description(
const Locale & lang_r =
Locale() )
const;
365 std::string insnotify(
const Locale & lang_r =
Locale() )
const;
367 std::string delnotify(
const Locale & lang_r =
Locale() )
const;
370 std::string licenseToConfirm(
const Locale & lang_r =
Locale() )
const;
372 bool needToAcceptLicense()
const;
410 std::string lookupStrAttribute(
const SolvAttr &
attr )
const;
427 unsigned long long lookupNumAttribute(
const SolvAttr &
attr )
const;
429 unsigned long long lookupNumAttribute(
const SolvAttr &
attr,
unsigned long long notfound_r )
const;
435 bool lookupBoolAttribute(
const SolvAttr &
attr )
const;
482 {
return lhs.
get() == rhs.
get(); }
486 {
return lhs.
get() != rhs.
get(); }
490 {
return lhs.
get() < rhs.
get(); }
513 res = lhs.
name().compare( rhs.
name() );
549 , boost::forward_traversal_tag
606 Solvable operator()(
const ResObject_constPtr & res_r )
const;
615 #endif // ZYPP_SAT_SOLVABLE_H static const SolvableIdType noSolvableId(0)
Id to denote Solvable::noSolvable.
std::ostream & dumpAsXmlOn(std::ostream &str, const FileConflicts &obj)
relates: FileConflicts XML output
bool sameNVRA(const Solvable &rhs) const
Test for same name-version-release.arch.
std::string name() const
The name (without any ResKind prefix).
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
relates: FileConflicts Stream output
bool operator<(const LocaleSupport &lhs, const LocaleSupport &rhs)
relates: LocaleSupport
static const IdString ptfMasterToken
Indicator provides ptf()
A Solvable object within the sat Pool.
IdType id() const
Expert backdoor.
ResKind kind() const
The Solvables ResKind.
Container of Capability (currently read only).
SolvableIterator(const Solvable &val_r)
Enumeration class of dependency types.
#define ZYPP_DEPRECATED
The ZYPP_DEPRECATED macro can be used to trigger compile-time warnings with gcc >= 3...
bool isKind(TIterator begin, TIterator end) const
std::string asString(const Patch::Category &obj)
relates: Patch::Category string representation.
static const IdString patternToken
Indicator provides pattern()
Store and operate with byte count.
std::unordered_set< Locale > LocaleSet
IdType id() const
Expert backdoor.
ZYPP_DEFINE_ID_HASHABLE(::zypp::sat::Solvable)
String related utilities and Regular expression matching.
bool isKind(const ResKind &kind_r) const
Test whether a Solvable is of a certain ResKind.
bool operator==(const FileConflicts &lhs, const FileConflicts &rhs)
relates: FileConflicts
int IdType
Generic Id type.
What is known about a repository.
Access to the sat-pools string space.
Common Platform Enumearation (2.3) See http://cpe.mitre.org/ for more information on the Common Platf...
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Edition represents [epoch:]version[-release]
Iterate over valid Solvables in the pool.
int compare(const Arch &rhs) const
Arch comparison.
bool identical(const Solvable &rhs) const
Test whether two Solvables have the same content.
std::string asUserString(VendorSupportOption opt)
converts the support option to a name intended to be printed to the user.
Capability productProvides() const
Return the provided productToken or Capability::Null.
static const Solvable noSolvable
Represents no Solvable.
bool isKind(const Solvable &solvable_r)
relates: Solvable Test whether a Solvable is of a certain Kind.
static const IdString productToken
Indicator provides product()
int compareByNVRA(const Solvable &lhs, const Solvable &rhs)
relates: Solvable Compare according to kind, name, edition and arch.
static int compare(const Derived &lhs, const Derived &rhs)
static const IdString ptfPackageToken
Indicator provides ptf-package()
::s_Solvable CSolvable
Wrapped libsolv C data type exposed as backdoor.
Store and operate on date (time_t).
bool identIsAutoInstalled() const
Whether an installed solvable with the same ident is flagged as AutoInstalled.
Backlink to the associated PoolImpl.
for_use_in_switch inSwitch() const
Enumarator provided for use in switch statement.
Edition edition() const
The edition (version-release).
Solvable dereference() const
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
Convenience char* constructible from std::string and char*, it maps (char*)0 to an empty string...
Capability patternProvides() const
Return the provided patternToken or Capability::Null.
bool sameNVRA(const Solvable &lhs, const Solvable &rhs)
relates: Solvable Test for same name version release and arch.
bool isProductPackage() const
Whether this solvable provides the productToken.
int compareByN(const Solvable &lhs, const Solvable &rhs)
relates: Solvable Compare according to kind and name.
Arch arch() const
The architecture.
void getSupportedLocales(LocaleSet &locales_r) const
Capabilities operator[](Dep which_r) const
void initialAssignVal(const Solvable &val_r)
void assignVal(const Solvable &val_r)
bool isPatternPackage() const
Whether this solvable provides the patternToken.
Solvable nextInPool() const
Return next Solvable in Pool (or noSolvable).
'Language[_Country]' codes.
std::unordered_set< Capability > CapabilitySet
detail::CSolvable * get() const
Expert backdoor.
int compareByNVR(const Solvable &lhs, const Solvable &rhs)
relates: Solvable Compare according to kind, name and edition.
friend class boost::iterator_core_access
bool identical(const Solvable &lhs, const Solvable &rhs)
relates: Solvable Test for same content.
Solvable()
Default ctor creates noSolvable.
SolvableIterator(SolvableIdType id_r)
sat::detail::SolvableIdType IdType
Helper that splits an identifier into kind and name or vice versa.
std::ostream & dumpOn(std::ostream &str, const LocaleSupport &obj)
relates: LocaleSupport More verbose stream output including dependencies
Capabilities dep(Dep which_r) const
Return Capabilities selected by Dep constant.
bool operator!=(const FileConflicts &lhs, const FileConflicts &rhs)
relates: FileConflicts
unsigned int SolvableIdType
Id type to connect Solvable and sat-solvable.
Solvable operator()(const Solvable &solv_r) const
Combining sat::Solvable and ResStatus.
static const IdString retractedToken
Indicator provides retracted-patch-package()
To Solvable transform functor.
Easy-to use interface to the ZYPP dependency resolver.
IdString ident() const
The identifier.