libzypp 17.37.17
|
Global ResObject pool. More...
#include <zypp/ResPool.h>
Classes | |
class | EstablishedStates |
A copy of the Pools initial ValidateValues of pseudo installed items. More... |
Public Types | |
using | value_type = PoolItem |
PoolItem | |
using | size_type = pool::PoolTraits::size_type |
using | const_iterator = pool::PoolTraits::const_iterator |
using | repository_iterator = pool::PoolTraits::repository_iterator |
Public Member Functions | |
ResPoolProxy | proxy () const |
preliminary | |
Resolver & | resolver () const |
The Resolver. | |
const SerialNumber & | serial () const |
The pools serial number. | |
bool | empty () const |
size_type | size () const |
Iterate over all PoolItems (all kinds). | |
const_iterator | begin () const |
const_iterator | end () const |
PoolItem | find (const sat::Solvable &slv_r) const |
Return the corresponding PoolItem. | |
PoolItem | find (const ResObject::constPtr &resolvable_r) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Iterate over all PoolItems matching a \c TFilter. | |
template<class TFilter> | |
filter_iterator< TFilter, const_iterator > | filterBegin (const TFilter &filter_r) const |
template<class TFilter> | |
filter_iterator< TFilter, const_iterator > | filterEnd (const TFilter &filter_r) const |
template<class TFilter> | |
Iterable< filter_iterator< TFilter, const_iterator > > | filter (const TFilter &filter_r) const |
Iterate over all PoolItems by status. | |
Simply pass the ResStatus predicate you want to use as filter: Or use filter::ByStatus in more complex queries: // iterate over all (orphaned and recommended) items:
functor::Chain<filter::ByStatus,filter::ByStatus> myfilter( filter::ByStatus(&ResStatus::isOrphaned),
{ ... }
Logical functor chaining TACondition AND TBCondition. Definition Functional.h:165 | |
filter_iterator< filter::ByStatus, const_iterator > | byStatusBegin (const filter::ByStatus &filter_r) const |
filter_iterator< filter::ByStatus, const_iterator > | byStatusEnd (const filter::ByStatus &filter_r) const |
Iterable< filter_iterator< filter::ByStatus, const_iterator > > | byStatus (const filter::ByStatus &filter_r) const |
Iterate over all Repositories that contribute ResObjects. | |
size_type | knownRepositoriesSize () const |
repository_iterator | knownRepositoriesBegin () const |
repository_iterator | knownRepositoriesEnd () const |
Repository | reposFind (const std::string &alias_r) const |
Find a Repository named alias_r . | |
Iterable< repository_iterator > | knownRepositories () const |
Handle locale support. | |
A filter::ByLocaleSupport is provided to iterate over all items supporting a specific locale.
{
MIL << *it << endl; // supporting "de"
}
f = filter::ByLocaleSupport( pool.getRequestedLocales() );
{
MIL << *it << endl; // supporting any requested locale
}
Filter solvables according to their locale support. Definition Filter.h:64 | |
void | setRequestedLocales (const LocaleSet &locales_r) |
Set the requested locales. | |
bool | addRequestedLocale (const Locale &locale_r) |
Add one Locale to the set of requested locales. | |
bool | eraseRequestedLocale (const Locale &locale_r) |
Erase one Locale from the set of requested locales. | |
const LocaleSet & | getRequestedLocales () const |
Return the requested locales. | |
bool | isRequestedLocale (const Locale &locale_r) const |
Whether this Locale is in the set of requested locales. | |
const LocaleSet & | getAvailableLocales () const |
Get the set of available locales. | |
bool | isAvailableLocale (const Locale &locale_r) const |
Whether this Locale is in the set of available locales. |
Static Public Member Functions | |
static ResPool | instance () |
Singleton ctor. |
Friends | |
std::ostream & | operator<< (std::ostream &str, const ResPool &obj) |
Related Symbols | |
(Note that these are not member symbols.) | |
std::ostream & | operator<< (std::ostream &str, const ResPool &obj) ZYPP_API |
Stream output. |
Iterate over all ResObjects of a certain kind. | |
using | ByKind = filter::ByKind |
using | byKind_iterator = filter_iterator<ByKind, const_iterator> |
byKind_iterator | byKindBegin (const ResKind &kind_r) const |
template<class TRes> | |
byKind_iterator | byKindBegin () const |
byKind_iterator | byKindEnd (const ResKind &kind_r) const |
template<class TRes> | |
byKind_iterator | byKindEnd () const |
Iterable< byKind_iterator > | byKind (const ResKind &kind_r) const |
template<class TRes> | |
Iterable< byKind_iterator > | byKind () const |
Iterate over all ResObjects with a certain name (all kinds). | |
using | ByName = zypp::resfilter::ByName |
using | byName_iterator = filter_iterator<ByName, const_iterator> |
byName_iterator | byNameBegin (const std::string &name_r) const |
byName_iterator | byNameEnd (const std::string &name_r) const |
Iterable< byName_iterator > | byName (const std::string &name_r) const |
Misc Data. | |
using | ChangedPseudoInstalled = EstablishedStates::ChangedPseudoInstalled |
Map holding pseudo installed items where current and established status differ. | |
EstablishedStates | establishedStates () const |
Factory for EstablishedStates. | |
ChangedPseudoInstalled | changedPseudoInstalled () const |
Return all pseudo installed items whose current state differs from their initial one. |
Handle hard locks (e.g set from /etc/zypp/locks). | |
As this kind of lock is query based, it's quite expensive. These queries are re-evaluated when adding new repos to the pool. | |
using | HardLockQueries = pool::PoolTraits::HardLockQueries |
using | hardLockQueries_iterator = pool::PoolTraits::hardLockQueries_iterator |
RW_pointer< pool::PoolTraits::Impl > | _pimpl |
Access to implementation. | |
bool | hardLockQueriesEmpty () const |
size_type | hardLockQueriesSize () const |
hardLockQueries_iterator | hardLockQueriesBegin () const |
hardLockQueries_iterator | hardLockQueriesEnd () const |
Iterable< hardLockQueries_iterator > | hardLockQueries () const |
void | setHardLockQueries (const HardLockQueries &newLocks_r) |
Set a new set of queries. | |
void | getHardLockQueries (HardLockQueries &activeLocks_r) |
Suggest a new set of queries based on the current selection. | |
const pool::PoolTraits::ItemContainerT & | store () const |
const pool::PoolTraits::Id2ItemT & | id2item () const |
ResPool (pool::PoolTraits::Impl_Ptr impl_r) | |
Ctor. |
Global ResObject pool.
Explicitly shared singleton.
For most (*Begin,*End) iterator-pairs there's also an Iterable provided, so you can use then in range-based for loops:
using zypp::ResPool::value_type = PoolItem |
using zypp::ResPool::ByIdent = pool::ByIdent |
using zypp::ResPool::ByKind = filter::ByKind |
|
private |
Ctor.
Definition at line 49 of file ResPool.cc.
|
static |
Singleton ctor.
Definition at line 38 of file ResPool.cc.
ResPoolProxy zypp::ResPool::proxy | ( | ) | const |
preliminary
Definition at line 59 of file ResPool.cc.
Resolver & zypp::ResPool::resolver | ( | ) | const |
The Resolver.
Definition at line 62 of file ResPool.cc.
const SerialNumber & zypp::ResPool::serial | ( | ) | const |
The pools serial number.
Changing whenever the whenever the content changes. (Resolvables or Dependencies).
Definition at line 65 of file ResPool.cc.
bool zypp::ResPool::empty | ( | ) | const |
Definition at line 68 of file ResPool.cc.
ResPool::size_type zypp::ResPool::size | ( | ) | const |
Definition at line 71 of file ResPool.cc.
|
inline |
|
inline |
PoolItem zypp::ResPool::find | ( | const sat::Solvable & | slv_r | ) | const |
Return the corresponding PoolItem.
Pool and sat pool should be in sync. Returns an empty PoolItem if there is no corresponding PoolItem.
Definition at line 74 of file ResPool.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Derive name and kind from sat::Solvable.
|
inline |
Takes a sat::Solvable::ident string.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Derive name and kind from sat::Solvable.
|
inline |
Takes a sat::Solvable::ident string.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
ResPool::EstablishedStates zypp::ResPool::establishedStates | ( | ) | const |
Factory for EstablishedStates.
A few internal algorithms benefit from keeping an instance across pool content changes. User code usually want's to call changedPseudoInstalled directly.
Definition at line 77 of file ResPool.cc.
|
inline |
Return all pseudo installed items whose current state differs from their initial one.
E.g. a Patch may become SATISFIED by updating the packages it refers to. For this to happen it does not matter whether you selected the Patch or whether you selected the individual Packages. A Patches status is computed and updated with every solver run.
ResPool::size_type zypp::ResPool::knownRepositoriesSize | ( | ) | const |
Definition at line 80 of file ResPool.cc.
ResPool::repository_iterator zypp::ResPool::knownRepositoriesBegin | ( | ) | const |
Definition at line 83 of file ResPool.cc.
ResPool::repository_iterator zypp::ResPool::knownRepositoriesEnd | ( | ) | const |
Definition at line 86 of file ResPool.cc.
Repository zypp::ResPool::reposFind | ( | const std::string & | alias_r | ) | const |
Find a Repository named alias_r
.
Returns Repository::noRepository if there is no such Repository.
Definition at line 89 of file ResPool.cc.
|
inline |
void zypp::ResPool::setRequestedLocales | ( | const LocaleSet & | locales_r | ) |
Set the requested locales.
Languages to be supported by the system, e.g. language specific packages to be installed.
Definition at line 122 of file ResPool.cc.
Add one Locale to the set of requested locales.
Return true
if locale_r
was newly added to the set.
Definition at line 125 of file ResPool.cc.
Erase one Locale from the set of requested locales.
Return false
if locale_r
was not found in the set.
Definition at line 128 of file ResPool.cc.
const LocaleSet & zypp::ResPool::getRequestedLocales | ( | ) | const |
Return the requested locales.
Definition at line 131 of file ResPool.cc.
Whether this Locale is in the set of requested locales.
Definition at line 134 of file ResPool.cc.
const LocaleSet & zypp::ResPool::getAvailableLocales | ( | ) | const |
Get the set of available locales.
This is computed from the package data so it actually represents all locales packages claim to support.
Definition at line 137 of file ResPool.cc.
Whether this Locale is in the set of available locales.
Definition at line 140 of file ResPool.cc.
bool zypp::ResPool::hardLockQueriesEmpty | ( | ) | const |
Definition at line 92 of file ResPool.cc.
ResPool::size_type zypp::ResPool::hardLockQueriesSize | ( | ) | const |
Definition at line 95 of file ResPool.cc.
ResPool::hardLockQueries_iterator zypp::ResPool::hardLockQueriesBegin | ( | ) | const |
Definition at line 98 of file ResPool.cc.
ResPool::hardLockQueries_iterator zypp::ResPool::hardLockQueriesEnd | ( | ) | const |
Definition at line 101 of file ResPool.cc.
|
inline |
void zypp::ResPool::setHardLockQueries | ( | const HardLockQueries & | newLocks_r | ) |
Set a new set of queries.
The hard-locks of existing PoolItems are adjusted according to the queries. (usually called on target load)
Definition at line 104 of file ResPool.cc.
void zypp::ResPool::getHardLockQueries | ( | HardLockQueries & | activeLocks_r | ) |
Suggest a new set of queries based on the current selection.
(usually remembered on commit).
Definition at line 107 of file ResPool.cc.
|
private |
Definition at line 111 of file ResPool.cc.
|
private |
Definition at line 114 of file ResPool.cc.
|
friend |
Definition at line 148 of file ResPool.cc.
|
Stream output.
Definition at line 148 of file ResPool.cc.
|
private |