libzypp
13.10.6
|
Global ResObject pool. More...
#include <ResPool.h>
Public Types | |
typedef PoolItem | value_type |
PoolItem More... | |
typedef pool::PoolTraits::size_type | size_type |
typedef pool::PoolTraits::const_iterator | const_iterator |
typedef pool::PoolTraits::repository_iterator | repository_iterator |
Public Member Functions | |
ResPoolProxy | proxy () const |
preliminary More... | |
Resolver & | resolver () const |
The Resolver. More... | |
const SerialNumber & | serial () const |
The pools serial number. More... | |
bool | empty () const |
size_type | size () const |
PoolItem | find (const sat::Solvable &slv_r) const |
Return the corresponding PoolItem. More... | |
PoolItem | find (const ResObject::constPtr &resolvable_r) const |
Iterate over all PoolItems (all kinds). | |
const_iterator | begin () const |
const_iterator | end () const |
Iterate over all PoolItems matching a \c _Filter. | |
template<class _Filter > | |
filter_iterator< _Filter, const_iterator > | filterBegin (const _Filter &filter_r) const |
template<class _Filter > | |
filter_iterator< _Filter, const_iterator > | filterEnd (const _Filter &filter_r) const |
Iterate over all PoolItems by status. | |
Simply pass the ResStatus predicate you want to use as filter: * // iterate over all orphaned items:
* {...}
*
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),
* filter::ByStatus(&ResStatus::isRecommended) );
* for_( it, pool.filterBegin(myfilter), pool.filterEnd(myfilter) )
* { ... }
*
| |
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 |
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 . More... | |
Handle locale support. | |
A filter::ByLocaleSupport is provided to iterate over all items supporting a specific locale.
* ResPool pool( ResPool::instance() );
*
* filter::ByLocaleSupport f( Locale("de") );
* for_( it, pool.filterBegin(f), pool.filterEnd(f) )
* {
* MIL << *it << endl; // supporting "de"
* }
*
* f = filter::ByLocaleSupport( pool.getRequestedLocales() );
* for_( it, pool.filterBegin(f), pool.filterEnd(f) )
* {
* MIL << *it << endl; // supporting any requested locale
* }
*
| |
void | setRequestedLocales (const LocaleSet &locales_r) |
Set the requested locales. More... | |
bool | addRequestedLocale (const Locale &locale_r) |
Add one Locale to the set of requested locales. More... | |
bool | eraseRequestedLocale (const Locale &locale_r) |
Erase one Locale from the set of requested locales. More... | |
const LocaleSet & | getRequestedLocales () const |
Return the requested locales. More... | |
bool | isRequestedLocale (const Locale &locale_r) const |
Whether this Locale is in the set of requested locales. More... | |
const LocaleSet & | getAvailableLocales () const |
Get the set of available locales. More... | |
bool | isAvailableLocale (const Locale &locale_r) const |
Whether this Locale is in the set of available locales. More... | |
Static Public Member Functions | |
static ResPool | instance () |
Singleton ctor. More... | |
Private Member Functions | |
const pool::PoolTraits::ItemContainerT & | store () const |
const pool::PoolTraits::Id2ItemT & | id2item () const |
ResPool (pool::PoolTraits::Impl_Ptr impl_r) | |
Ctor. More... | |
Private Attributes | |
RW_pointer < pool::PoolTraits::Impl > | _pimpl |
Access to implementation. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &str, const ResPool &obj) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const ResPool &obj) |
Iterate over all ResObjects of a certain kind. | |
typedef filter::ByKind | ByKind |
typedef filter_iterator < ByKind, const_iterator > | byKind_iterator |
byKind_iterator | byKindBegin (const ResKind &kind_r) const |
template<class _Res > | |
byKind_iterator | byKindBegin () const |
byKind_iterator | byKindEnd (const ResKind &kind_r) const |
template<class _Res > | |
byKind_iterator | byKindEnd () const |
Iterate over all ResObjects with a certain name (all kinds). | |
typedef zypp::resfilter::ByName | ByName |
typedef filter_iterator < ByName, const_iterator > | byName_iterator |
byName_iterator | byNameBegin (const std::string &name_r) const |
byName_iterator | byNameEnd (const std::string &name_r) const |
Handle automatic soft-locks. | |
Solvables with and ident listed here are per default created with a setSoftLock applied. I.e. the Resolver should not automatically select them, if they are just recommended. This list is considered when adding new repos to the pool. It is not the list of currently softLocked items. Mainly used to re-apply soft-locks remembered during the last commit. | |
typedef pool::PoolTraits::AutoSoftLocks | AutoSoftLocks |
typedef pool::PoolTraits::autoSoftLocks_iterator | autoSoftLocks_iterator |
bool | autoSoftLocksEmpty () const |
size_type | autoSoftLocksSize () const |
autoSoftLocks_iterator | autoSoftLocksBegin () const |
autoSoftLocks_iterator | autoSoftLocksEnd () const |
void | setAutoSoftLocks (const AutoSoftLocks &newLocks_r) |
Set a new soft-lock list. More... | |
void | getActiveSoftLocks (AutoSoftLocks &activeLocks_r) |
Suggest a new soft-lock list based on the current selection. More... | |
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. | |
typedef pool::PoolTraits::HardLockQueries | HardLockQueries |
typedef pool::PoolTraits::hardLockQueries_iterator | hardLockQueries_iterator |
bool | hardLockQueriesEmpty () const |
size_type | hardLockQueriesSize () const |
hardLockQueries_iterator | hardLockQueriesBegin () const |
hardLockQueries_iterator | hardLockQueriesEnd () const |
void | setHardLockQueries (const HardLockQueries &newLocks_r) |
Set a new set of queries. More... | |
void | getHardLockQueries (HardLockQueries &activeLocks_r) |
Suggest a new set of queries based on the current selection. More... | |
Global ResObject pool.
Explicitly shared singleton.
typedef PoolItem zypp::ResPool::value_type |
typedef pool::ByIdent zypp::ResPool::ByIdent |
typedef filter::ByKind zypp::ResPool::ByKind |
|
private |
Ctor.
Definition at line 44 of file ResPool.cc.
|
static |
Singleton ctor.
Definition at line 33 of file ResPool.cc.
ResPoolProxy zypp::ResPool::proxy | ( | ) | const |
preliminary
Definition at line 54 of file ResPool.cc.
Resolver & zypp::ResPool::resolver | ( | ) | const |
The Resolver.
Definition at line 57 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 60 of file ResPool.cc.
bool zypp::ResPool::empty | ( | ) | const |
Definition at line 63 of file ResPool.cc.
ResPool::size_type zypp::ResPool::size | ( | ) | const |
Definition at line 66 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 70 of file ResPool.cc.
|
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 |
ResPool::size_type zypp::ResPool::knownRepositoriesSize | ( | ) | const |
Definition at line 74 of file ResPool.cc.
ResPool::repository_iterator zypp::ResPool::knownRepositoriesBegin | ( | ) | const |
Definition at line 77 of file ResPool.cc.
ResPool::repository_iterator zypp::ResPool::knownRepositoriesEnd | ( | ) | const |
Definition at line 80 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 83 of file ResPool.cc.
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 135 of file ResPool.cc.
bool zypp::ResPool::addRequestedLocale | ( | const Locale & | locale_r | ) |
Add one Locale to the set of requested locales.
Return true
if locale_r
was newly added to the set.
Definition at line 138 of file ResPool.cc.
bool zypp::ResPool::eraseRequestedLocale | ( | const Locale & | locale_r | ) |
Erase one Locale from the set of requested locales.
Return false
if locale_r
was not found in the set.
Definition at line 141 of file ResPool.cc.
const LocaleSet & zypp::ResPool::getRequestedLocales | ( | ) | const |
Return the requested locales.
Definition at line 144 of file ResPool.cc.
bool zypp::ResPool::isRequestedLocale | ( | const Locale & | locale_r | ) | const |
Whether this Locale is in the set of requested locales.
Definition at line 147 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 150 of file ResPool.cc.
bool zypp::ResPool::isAvailableLocale | ( | const Locale & | locale_r | ) | const |
Whether this Locale is in the set of available locales.
Definition at line 153 of file ResPool.cc.
bool zypp::ResPool::autoSoftLocksEmpty | ( | ) | const |
Definition at line 86 of file ResPool.cc.
ResPool::size_type zypp::ResPool::autoSoftLocksSize | ( | ) | const |
Definition at line 89 of file ResPool.cc.
ResPool::autoSoftLocks_iterator zypp::ResPool::autoSoftLocksBegin | ( | ) | const |
Definition at line 92 of file ResPool.cc.
ResPool::autoSoftLocks_iterator zypp::ResPool::autoSoftLocksEnd | ( | ) | const |
Definition at line 95 of file ResPool.cc.
void zypp::ResPool::setAutoSoftLocks | ( | const AutoSoftLocks & | newLocks_r | ) |
Set a new soft-lock list.
The soft-locks of existing PoolItems are adjusted according to the list. (usually called on target load)
Definition at line 98 of file ResPool.cc.
void zypp::ResPool::getActiveSoftLocks | ( | AutoSoftLocks & | activeLocks_r | ) |
Suggest a new soft-lock list based on the current selection.
Based on the the current soft-lock list. Items tagged to be installed are removed, and those tagged to be deleted are added. (usually remembered on commit).
Definition at line 101 of file ResPool.cc.
bool zypp::ResPool::hardLockQueriesEmpty | ( | ) | const |
Definition at line 105 of file ResPool.cc.
ResPool::size_type zypp::ResPool::hardLockQueriesSize | ( | ) | const |
Definition at line 108 of file ResPool.cc.
ResPool::hardLockQueries_iterator zypp::ResPool::hardLockQueriesBegin | ( | ) | const |
Definition at line 111 of file ResPool.cc.
ResPool::hardLockQueries_iterator zypp::ResPool::hardLockQueriesEnd | ( | ) | const |
Definition at line 114 of file ResPool.cc.
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 117 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 120 of file ResPool.cc.
|
private |
Definition at line 124 of file ResPool.cc.
|
private |
Definition at line 127 of file ResPool.cc.
|
friend |
Definition at line 161 of file ResPool.cc.
|
related |
Stream output
Definition at line 161 of file ResPool.cc.
|
private |