libzypp 8.13.6
|
#include <PoolImpl.h>
Public Member Functions | |
PoolImpl () | |
Default ctor. | |
~PoolImpl () | |
Dtor. | |
::_Pool * | operator-> () |
Pointer style access forwarded to sat-pool. | |
const SerialNumber & | serial () const |
Serial number changing whenever the content changes. | |
void | prepare () const |
Update housekeeping data (e.g. | |
bool | isSystemRepo (::_Repo *repo_r) const |
::_Repo * | systemRepo () const |
void | _postRepoAdd (::_Repo *repo_r) |
Helper postprocessing the repo after adding solv or helix files. | |
bool | validSolvable (const ::_Solvable &slv_r) const |
a valid Solvable has a non NULL repo pointer. | |
bool | validSolvable (SolvableIdType id_r) const |
bool | validSolvable (const ::_Solvable *slv_r) const |
::_Pool * | getPool () const |
::_Repo * | getRepo (RepoIdType id_r) const |
::_Solvable * | getSolvable (SolvableIdType id_r) const |
Return pointer to the sat-solvable or NULL if it is not valid. | |
SolvableIdType | getFirstId () const |
Get id of the first valid Solvable. | |
SolvableIdType | getNextId (SolvableIdType id_r) const |
Get id of the next valid Solvable. | |
const RepoInfo & | repoInfo (RepoIdType id_r) |
void | setRepoInfo (RepoIdType id_r, const RepoInfo &info_r) |
Also adjust repo priority and subpriority accordingly. | |
void | eraseRepoInfo (RepoIdType id_r) |
const sat::detail::IdType | whatProvidesData (unsigned offset_r) |
Returns the id stored at offset_r in the internal whatprovidesdata array. | |
unsigned | whatProvides (Capability cap_r) |
Returns offset into the internal whatprovidesdata array. | |
Actions invalidating housekeeping data. | |
All methods expect valid arguments being passed. | |
::_Repo * | _createRepo (const std::string &name_r) |
Creating a new repo named name_r. | |
void | _deleteRepo (::_Repo *repo_r) |
Creating a new repo named name_r. | |
int | _addSolv (::_Repo *repo_r, FILE *file_r) |
Adding solv file to a repo. | |
int | _addHelix (::_Repo *repo_r, FILE *file_r) |
Adding helix file to a repo. | |
detail::SolvableIdType | _addSolvables (::_Repo *repo_r, unsigned count_r) |
Adding Solvables to a repo. | |
Requested locales. | |
void | setTextLocale (const Locale &locale_r) |
void | setRequestedLocales (const LocaleSet &locales_r) |
bool | addRequestedLocale (const Locale &locale_r) |
bool | eraseRequestedLocale (const Locale &locale_r) |
const LocaleSet & | getRequestedLocales () const |
bool | isRequestedLocale (const Locale &locale_r) const |
const LocaleSet & | getAvailableLocales () const |
bool | isAvailableLocale (const Locale &locale_r) const |
Static Public Member Functions | |
static const std::string & | systemRepoAlias () |
Reserved system repository alias . | |
Private Member Functions | |
void | setDirty (const char *a1=0, const char *a2=0, const char *a3=0) |
Invalidate housekeeping data (e.g. | |
void | depSetDirty (const char *a1=0, const char *a2=0, const char *a3=0) |
Invalidate housekeeping data (e.g. | |
void | multiversionListInit () const |
void | onSystemByUserListInit () const |
Static Private Member Functions | |
static detail::IdType | nsCallback (::_Pool *, void *data, detail::IdType lhs, detail::IdType rhs) |
Callback to resolve namespace dependencies (language, modalias, filesystem, etc.). | |
Private Attributes | |
::_Pool * | _pool |
sat-pool. | |
SerialNumber | _serial |
Serial number. | |
SerialNumberWatcher | _watcher |
Watch serial number. | |
std::map< RepoIdType, RepoInfo > | _repoinfos |
Additional RepoInfo. | |
LocaleSet | _requestedLocales |
scoped_ptr< LocaleSet > | _availableLocalesPtr |
std::tr1::unordered_set< IdString > | _locale2Solver |
scoped_ptr< MultiversionList > | _multiversionListPtr |
scoped_ptr< OnSystemByUserList > | _onSystemByUserListPtr |
Multiversion install. | |
typedef IdStringSet | MultiversionList |
const MultiversionList & | multiversionList () const |
bool | isMultiversion (IdString ident_r) const |
Installed on behalf of a user request hint. | |
typedef IdStringSet | OnSystemByUserList |
const OnSystemByUserList & | onSystemByUserList () const |
bool | isOnSystemByUser (IdString ident_r) const |
Definition at line 48 of file PoolImpl.h.
Definition at line 229 of file PoolImpl.h.
Definition at line 248 of file PoolImpl.h.
zypp::sat::detail::PoolImpl::PoolImpl | ( | ) |
Default ctor.
Definition at line 176 of file PoolImpl.cc.
References _, _pool, zypp::sat::detail::logSat(), MIL, nsCallback(), and ZYPP_THROW.
zypp::sat::detail::PoolImpl::~PoolImpl | ( | ) |
::_Pool* zypp::sat::detail::PoolImpl::operator-> | ( | ) | [inline] |
Pointer style access forwarded to sat-pool.
Definition at line 58 of file PoolImpl.h.
References _pool.
const SerialNumber& zypp::sat::detail::PoolImpl::serial | ( | ) | const [inline] |
Serial number changing whenever the content changes.
Definition at line 63 of file PoolImpl.h.
References _serial.
void zypp::sat::detail::PoolImpl::prepare | ( | ) | const |
Update housekeeping data (e.g.
whatprovides).
Definition at line 238 of file PoolImpl.cc.
References _pool, _serial, _watcher, zypp::Arch::asString(), zypp::ZConfig::instance(), MIL, zypp::SerialNumberWatcher::remember(), setTextLocale(), zypp::ZConfig::systemArchitecture(), and zypp::ZConfig::textLocale().
Referenced by whatProvides().
void zypp::sat::detail::PoolImpl::setDirty | ( | const char * | a1 = 0 , |
const char * | a2 = 0 , |
||
const char * | a3 = 0 |
||
) | [private] |
Invalidate housekeeping data (e.g.
whatprovides) if the pools content changed.
Definition at line 211 of file PoolImpl.cc.
References _availableLocalesPtr, _multiversionListPtr, _serial, depSetDirty(), MIL, and zypp::SerialNumber::setDirty().
Referenced by _addHelix(), _addSolv(), _addSolvables(), _createRepo(), _deleteRepo(), and setRepoInfo().
void zypp::sat::detail::PoolImpl::depSetDirty | ( | const char * | a1 = 0 , |
const char * | a2 = 0 , |
||
const char * | a3 = 0 |
||
) | [private] |
Invalidate housekeeping data (e.g.
whatprovides) if dependencies changed.
Definition at line 227 of file PoolImpl.cc.
Referenced by addRequestedLocale(), eraseRequestedLocale(), setDirty(), and setRequestedLocales().
detail::IdType zypp::sat::detail::PoolImpl::nsCallback | ( | ::_Pool * | , |
void * | data, | ||
detail::IdType | lhs, | ||
detail::IdType | rhs | ||
) | [static, private] |
Callback to resolve namespace dependencies (language, modalias, filesystem, etc.).
Definition at line 98 of file PoolImpl.cc.
References _locale2Solver, zypp::str::asString(), zypp::PoolItem::buddy(), zypp::WatchFile::hasChanged(), zypp::str::hexdecode(), zypp::sat::Solvable::id(), zypp::IdString::id(), zypp::target::Modalias::instance(), zypp::WatchFile::NO_INIT, zypp::sat::detail::noId(), zypp::base::sysconfig::read(), zypp::str::split(), and WAR.
Referenced by PoolImpl().
const std::string & zypp::sat::detail::PoolImpl::systemRepoAlias | ( | ) | [static] |
Reserved system repository alias .
Definition at line 79 of file PoolImpl.cc.
Referenced by _createRepo().
bool zypp::sat::detail::PoolImpl::isSystemRepo | ( | ::_Repo * | repo_r | ) | const [inline] |
Definition at line 88 of file PoolImpl.h.
References _pool.
Referenced by _deleteRepo(), and _postRepoAdd().
::_Repo* zypp::sat::detail::PoolImpl::systemRepo | ( | ) | const [inline] |
Definition at line 91 of file PoolImpl.h.
References _pool.
_Repo * zypp::sat::detail::PoolImpl::_createRepo | ( | const std::string & | name_r | ) |
Creating a new repo named name_r.
Definition at line 261 of file PoolImpl.cc.
References _pool, setDirty(), and systemRepoAlias().
void zypp::sat::detail::PoolImpl::_deleteRepo | ( | ::_Repo * | repo_r | ) |
Creating a new repo named name_r.
Definition at line 270 of file PoolImpl.cc.
References _onSystemByUserListPtr, eraseRepoInfo(), isSystemRepo(), and setDirty().
int zypp::sat::detail::PoolImpl::_addSolv | ( | ::_Repo * | repo_r, |
FILE * | file_r | ||
) |
Adding solv file to a repo.
Except for isSystemRepo_r
, solvables of incompatible architecture are filtered out.
Definition at line 282 of file PoolImpl.cc.
References _postRepoAdd(), and setDirty().
int zypp::sat::detail::PoolImpl::_addHelix | ( | ::_Repo * | repo_r, |
FILE * | file_r | ||
) |
Adding helix file to a repo.
Except for isSystemRepo_r
, solvables of incompatible architecture are filtered out.
Definition at line 291 of file PoolImpl.cc.
References _postRepoAdd(), repo_add_helix(), and setDirty().
detail::SolvableIdType zypp::sat::detail::PoolImpl::_addSolvables | ( | ::_Repo * | repo_r, |
unsigned | count_r | ||
) |
void zypp::sat::detail::PoolImpl::_postRepoAdd | ( | ::_Repo * | repo_r | ) |
Helper postprocessing the repo after adding solv or helix files.
Definition at line 299 of file PoolImpl.cc.
References _onSystemByUserListPtr, _pool, zypp::Arch::compatSet(), for_, zypp::ZConfig::instance(), and isSystemRepo().
Referenced by _addHelix(), and _addSolv().
bool zypp::sat::detail::PoolImpl::validSolvable | ( | const ::_Solvable & | slv_r | ) | const [inline] |
a valid
Solvable has a non NULL repo pointer.
Definition at line 127 of file PoolImpl.h.
Referenced by getNextId(), and getSolvable().
bool zypp::sat::detail::PoolImpl::validSolvable | ( | SolvableIdType | id_r | ) | const [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 130 of file PoolImpl.h.
References _pool, and validSolvable().
Referenced by validSolvable().
bool zypp::sat::detail::PoolImpl::validSolvable | ( | const ::_Solvable * | slv_r | ) | const [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 133 of file PoolImpl.h.
References _pool, and validSolvable().
Referenced by validSolvable().
::_Pool* zypp::sat::detail::PoolImpl::getPool | ( | ) | const [inline] |
Definition at line 137 of file PoolImpl.h.
References _pool.
::_Repo* zypp::sat::detail::PoolImpl::getRepo | ( | RepoIdType | id_r | ) | const [inline] |
Definition at line 141 of file PoolImpl.h.
Referenced by setRepoInfo().
::_Solvable* zypp::sat::detail::PoolImpl::getSolvable | ( | SolvableIdType | id_r | ) | const [inline] |
Return pointer to the sat-solvable or NULL if it is not valid.
Definition at line 147 of file PoolImpl.h.
References _pool, and validSolvable().
SolvableIdType zypp::sat::detail::PoolImpl::getFirstId | ( | ) | const [inline] |
Get id of the first valid Solvable.
This is the next valid after the system solvable.
Definition at line 158 of file PoolImpl.h.
References getNextId().
SolvableIdType zypp::sat::detail::PoolImpl::getNextId | ( | SolvableIdType | id_r | ) | const [inline] |
Get id of the next valid Solvable.
This goes round robbin. At the end it returns noSolvableId. Passing noSolvableId it returns the 1st valid Solvable.
Definition at line 166 of file PoolImpl.h.
References _pool, zypp::sat::detail::noSolvableId(), and validSolvable().
Referenced by getFirstId().
const RepoInfo& zypp::sat::detail::PoolImpl::repoInfo | ( | RepoIdType | id_r | ) | [inline] |
Definition at line 178 of file PoolImpl.h.
References _repoinfos.
void zypp::sat::detail::PoolImpl::setRepoInfo | ( | RepoIdType | id_r, |
const RepoInfo & | info_r | ||
) |
Also adjust repo priority and subpriority accordingly.
Definition at line 354 of file PoolImpl.cc.
References _repoinfos, zypp::repo::RepoInfoBase::alias(), getRepo(), zypp::RepoInfo::priority(), setDirty(), and zypp::RepoInfo::url().
void zypp::sat::detail::PoolImpl::eraseRepoInfo | ( | RepoIdType | id_r | ) | [inline] |
const sat::detail::IdType zypp::sat::detail::PoolImpl::whatProvidesData | ( | unsigned | offset_r | ) | [inline] |
Returns the id stored at offset_r
in the internal whatprovidesdata array.
Definition at line 190 of file PoolImpl.h.
References _pool.
unsigned zypp::sat::detail::PoolImpl::whatProvides | ( | Capability | cap_r | ) | [inline] |
Returns offset into the internal whatprovidesdata array.
Use whatProvidesData to get the stored Id.
Definition at line 196 of file PoolImpl.h.
References _pool, zypp::Capability::id(), and prepare().
void zypp::sat::detail::PoolImpl::setTextLocale | ( | const Locale & | locale_r | ) |
Definition at line 399 of file PoolImpl.cc.
References _pool, zypp::dumpRangeLine(), zypp::Locale::fallback(), for_, MIL, and zypp::Locale::noCode.
Referenced by prepare().
void zypp::sat::detail::PoolImpl::setRequestedLocales | ( | const LocaleSet & | locales_r | ) |
Definition at line 416 of file PoolImpl.cc.
References _locale2Solver, zypp::sat::detail::_locale_hack(), _requestedLocales, depSetDirty(), and MIL.
bool zypp::sat::detail::PoolImpl::addRequestedLocale | ( | const Locale & | locale_r | ) |
Definition at line 424 of file PoolImpl.cc.
References _locale2Solver, zypp::sat::detail::_locale_hack(), _requestedLocales, zypp::Locale::code(), and depSetDirty().
bool zypp::sat::detail::PoolImpl::eraseRequestedLocale | ( | const Locale & | locale_r | ) |
Definition at line 435 of file PoolImpl.cc.
References _locale2Solver, zypp::sat::detail::_locale_hack(), _requestedLocales, zypp::Locale::code(), and depSetDirty().
const LocaleSet& zypp::sat::detail::PoolImpl::getRequestedLocales | ( | ) | const [inline] |
Definition at line 207 of file PoolImpl.h.
References _requestedLocales.
bool zypp::sat::detail::PoolImpl::isRequestedLocale | ( | const Locale & | locale_r | ) | const [inline] |
Definition at line 210 of file PoolImpl.h.
References _requestedLocales.
const LocaleSet & zypp::sat::detail::PoolImpl::getAvailableLocales | ( | ) | const |
Definition at line 476 of file PoolImpl.cc.
References _availableLocalesPtr, zypp::sat::detail::_getLocaleDeps(), for_, zypp::sat::Pool::instance(), zypp::sat::Pool::solvablesBegin(), and zypp::sat::Pool::solvablesEnd().
Referenced by isAvailableLocale().
bool zypp::sat::detail::PoolImpl::isAvailableLocale | ( | const Locale & | locale_r | ) | const [inline] |
Definition at line 218 of file PoolImpl.h.
References getAvailableLocales().
const MultiversionList& zypp::sat::detail::PoolImpl::multiversionList | ( | ) | const [inline] |
Definition at line 231 of file PoolImpl.h.
References _multiversionListPtr, and multiversionListInit().
Referenced by isMultiversion(), and multiversionListInit().
bool zypp::sat::detail::PoolImpl::isMultiversion | ( | IdString | ident_r | ) | const [inline] |
Definition at line 238 of file PoolImpl.h.
References multiversionList().
const OnSystemByUserList& zypp::sat::detail::PoolImpl::onSystemByUserList | ( | ) | const [inline] |
Definition at line 250 of file PoolImpl.h.
References _onSystemByUserListPtr, and onSystemByUserListInit().
Referenced by isOnSystemByUser(), and onSystemByUserListInit().
bool zypp::sat::detail::PoolImpl::isOnSystemByUser | ( | IdString | ident_r | ) | const [inline] |
Definition at line 257 of file PoolImpl.h.
References onSystemByUserList().
void zypp::sat::detail::PoolImpl::multiversionListInit | ( | ) | const [private] |
Definition at line 501 of file PoolImpl.cc.
References _multiversionListPtr, zypp::sat::WhatProvides::begin(), zypp::sat::WhatProvides::empty(), zypp::sat::WhatProvides::end(), for_, zypp::str::hasPrefix(), zypp::ZConfig::instance(), MIL, and multiversionList().
Referenced by multiversionList().
void zypp::sat::detail::PoolImpl::onSystemByUserListInit | ( | ) | const [private] |
Definition at line 534 of file PoolImpl.cc.
References _onSystemByUserListPtr, zypp::ZConfig::instance(), MIL, zypp::iostr::EachLine::next(), and onSystemByUserList().
Referenced by onSystemByUserList().
::_Pool* zypp::sat::detail::PoolImpl::_pool [private] |
sat-pool.
Definition at line 266 of file PoolImpl.h.
Referenced by _createRepo(), _postRepoAdd(), depSetDirty(), getNextId(), getPool(), getSolvable(), isSystemRepo(), operator->(), PoolImpl(), prepare(), setTextLocale(), systemRepo(), validSolvable(), whatProvides(), whatProvidesData(), and ~PoolImpl().
Serial number.
Definition at line 268 of file PoolImpl.h.
Referenced by prepare(), serial(), and setDirty().
std::map<RepoIdType,RepoInfo> zypp::sat::detail::PoolImpl::_repoinfos [private] |
Additional RepoInfo.
Definition at line 272 of file PoolImpl.h.
Referenced by eraseRepoInfo(), repoInfo(), and setRepoInfo().
Definition at line 275 of file PoolImpl.h.
Referenced by addRequestedLocale(), eraseRequestedLocale(), getRequestedLocales(), isRequestedLocale(), and setRequestedLocales().
scoped_ptr<LocaleSet> zypp::sat::detail::PoolImpl::_availableLocalesPtr [mutable, private] |
Definition at line 276 of file PoolImpl.h.
Referenced by getAvailableLocales(), and setDirty().
std::tr1::unordered_set<IdString> zypp::sat::detail::PoolImpl::_locale2Solver [mutable, private] |
Definition at line 277 of file PoolImpl.h.
Referenced by addRequestedLocale(), eraseRequestedLocale(), nsCallback(), and setRequestedLocales().
scoped_ptr<MultiversionList> zypp::sat::detail::PoolImpl::_multiversionListPtr [mutable, private] |
Definition at line 281 of file PoolImpl.h.
Referenced by multiversionList(), multiversionListInit(), and setDirty().
scoped_ptr<OnSystemByUserList> zypp::sat::detail::PoolImpl::_onSystemByUserListPtr [mutable, private] |
Definition at line 285 of file PoolImpl.h.
Referenced by _deleteRepo(), _postRepoAdd(), onSystemByUserList(), and onSystemByUserListInit().