libzypp  15.28.6
zypp::sat::Pool Class Reference

Global sat-pool. More...

#include <Pool.h>

Inheritance diagram for zypp::sat::Pool:

Public Types

typedef detail::SolvableIterator SolvableIterator
 
typedef
zypp::detail::RepositoryIterator 
RepositoryIterator
 
typedef detail::size_type size_type
 

Public Member Functions

 Pool (const detail::PoolMember &)
 Ctor from PoolMember. More...
 
size_type capacity () const
 Internal array size for stats only. More...
 
const SerialNumberserial () const
 Housekeeping data serial number. More...
 
void prepare () const
 Update housekeeping data if necessary (e.g. More...
 
void prepareForSolving () const
 prepare plus some expensive checks done before solving only. More...
 
Pathname rootDir () const
 Get rootdir (for file conflicts check) More...
 
void rootDir (const Pathname &root_r)
 Set rootdir (for file conflicts check) More...
 
bool reposEmpty () const
 Whether Pool contains repos. More...
 
size_type reposSize () const
 Number of repos in Pool. More...
 
RepositoryIterator reposBegin () const
 Iterator to the first Repository. More...
 
RepositoryIterator reposEnd () const
 Iterator behind the last Repository. More...
 
Iterable< RepositoryIteratorrepos () const
 Iterate the repositories. More...
 
Repository reposInsert (const std::string &alias_r)
 Return a Repository named alias_r. More...
 
Repository reposFind (const std::string &alias_r) const
 Find a Repository named alias_r. More...
 
void reposErase (const std::string &alias_r)
 Remove a Repository named alias_r. More...
 
Repository findSystemRepo () const
 Return the system repository if it is on the pool. More...
 
Repository systemRepo ()
 Return the system repository, create it if missing. More...
 
Repository addRepoSolv (const Pathname &file_r, const std::string &name_r)
 Load Solvables from a solv-file into a Repository named name_r. More...
 
Repository addRepoSolv (const Pathname &file_r)
 
Repository addRepoSolv (const Pathname &file_r, const RepoInfo &info_r)
 
Repository addRepoHelix (const Pathname &file_r, const std::string &name_r)
 Load Solvables from a helix-file into a Repository named name_r. More...
 
Repository addRepoHelix (const Pathname &file_r)
 
Repository addRepoHelix (const Pathname &file_r, const RepoInfo &info_r)
 
bool solvablesEmpty () const
 Whether Pool contains solvables. More...
 
size_type solvablesSize () const
 Number of solvables in Pool. More...
 
SolvableIterator solvablesBegin () const
 Iterator to the first Solvable. More...
 
SolvableIterator solvablesEnd () const
 Iterator behind the last Solvable. More...
 
Iterable< SolvableIteratorsolvables () const
 Iterate the solvables. More...
 
WhatProvides whatProvides (Capability cap_r) const
 Conainer of all Solvable providing cap_r. More...
 
detail::CPoolget () const
 Expert backdoor. More...
 
Iterate all Solvables matching a \c TFilter.
template<class TFilter >
filter_iterator< TFilter,
SolvableIterator
filterBegin (const TFilter &filter_r) const
 
template<class TFilter >
filter_iterator< TFilter,
SolvableIterator
filterEnd (const TFilter &filter_r) const
 
Requested locales.
void setTextLocale (const Locale &locale_r)
 Set the default language for retrieving translated texts. More...
 
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 LocaleSetgetRequestedLocales () const
 Return the requested locales. More...
 
bool isRequestedLocale (const Locale &locale_r) const
 Whether this Locale is in the set of requested locales. More...
 
void initRequestedLocales (const LocaleSet &locales_r)
 Start tracking changes based on this locales_r. More...
 
const LocaleSetgetAddedRequestedLocales () const
 Added since last initRequestedLocales. More...
 
const LocaleSetgetRemovedRequestedLocales () const
 Removed since last initRequestedLocales. More...
 
const LocaleSetgetAvailableLocales () 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...
 
Autoinstalled
Queue autoInstalled () const
 Get ident list of all autoinstalled solvables. More...
 
void setAutoInstalled (const Queue &autoInstalled_r)
 Set ident list of all autoinstalled solvables. More...
 

Static Public Member Functions

static Pool instance ()
 Singleton ctor. More...
 
static const std::string & systemRepoAlias ()
 Reserved system repository alias . More...
 

Private Member Functions

 Pool ()
 Default ctor. More...
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const Pool &obj)
 
bool operator== (const Pool &lhs, const Pool &rhs)
 
bool operator!= (const Pool &lhs, const Pool &rhs)
 

Multiversion install.

Whether the pool contains packages which are multiversion installable.

See Also
Solvable::multiversionInstall
ZConfig::multiversionSpec
typedef SolvableSet MultiversionList
 
const MultiversionListmultiversion () const
 
ZYPP_DEPRECATED bool multiversionEmpty () const
 

Additional Inherited Members

- Static Protected Member Functions inherited from zypp::sat::detail::PoolMember
static PoolImplmyPool ()
 

Detailed Description

Global sat-pool.

Explicitly shared singleton Pool::instance.

Definition at line 44 of file Pool.h.

Member Typedef Documentation

Definition at line 49 of file Pool.h.

Definition at line 246 of file Pool.h.

Constructor & Destructor Documentation

zypp::sat::Pool::Pool ( const detail::PoolMember )
inline

Ctor from PoolMember.

Definition at line 57 of file Pool.h.

zypp::sat::Pool::Pool ( )
inlineprivate

Default ctor.

Definition at line 266 of file Pool.h.

Member Function Documentation

static Pool zypp::sat::Pool::instance ( )
inlinestatic

Singleton ctor.

Definition at line 53 of file Pool.h.

Pool::size_type zypp::sat::Pool::capacity ( ) const

Internal array size for stats only.

Definition at line 52 of file Pool.cc.

const SerialNumber & zypp::sat::Pool::serial ( ) const

Housekeeping data serial number.

Definition at line 55 of file Pool.cc.

void zypp::sat::Pool::prepare ( ) const

Update housekeeping data if necessary (e.g.

whatprovides).

Definition at line 58 of file Pool.cc.

void zypp::sat::Pool::prepareForSolving ( ) const

prepare plus some expensive checks done before solving only.

Definition at line 61 of file Pool.cc.

Pathname zypp::sat::Pool::rootDir ( ) const

Get rootdir (for file conflicts check)

Definition at line 64 of file Pool.cc.

void zypp::sat::Pool::rootDir ( const Pathname &  root_r)

Set rootdir (for file conflicts check)

Definition at line 67 of file Pool.cc.

bool zypp::sat::Pool::reposEmpty ( ) const

Whether Pool contains repos.

Definition at line 70 of file Pool.cc.

Pool::size_type zypp::sat::Pool::reposSize ( ) const

Number of repos in Pool.

Definition at line 73 of file Pool.cc.

Pool::RepositoryIterator zypp::sat::Pool::reposBegin ( ) const

Iterator to the first Repository.

Definition at line 76 of file Pool.cc.

Pool::RepositoryIterator zypp::sat::Pool::reposEnd ( ) const

Iterator behind the last Repository.

Definition at line 87 of file Pool.cc.

Iterable<RepositoryIterator> zypp::sat::Pool::repos ( ) const
inline

Iterate the repositories.

Definition at line 93 of file Pool.h.

Repository zypp::sat::Pool::reposInsert ( const std::string &  alias_r)

Return a Repository named alias_r.

It a such a Repository does not already exist a new empty Repository is created.

Definition at line 122 of file Pool.cc.

Repository zypp::sat::Pool::reposFind ( const std::string &  alias_r) const

Find a Repository named alias_r.

Returns norepository if there is no such Repository.

Definition at line 142 of file Pool.cc.

void zypp::sat::Pool::reposErase ( const std::string &  alias_r)
inline

Remove a Repository named alias_r.

See Also
Repository::eraseFromPool

Definition at line 110 of file Pool.h.

const std::string & zypp::sat::Pool::systemRepoAlias ( )
static

Reserved system repository alias .

Definition at line 46 of file Pool.cc.

Repository zypp::sat::Pool::findSystemRepo ( ) const

Return the system repository if it is on the pool.

Definition at line 152 of file Pool.cc.

Repository zypp::sat::Pool::systemRepo ( )

Return the system repository, create it if missing.

Definition at line 157 of file Pool.cc.

Repository zypp::sat::Pool::addRepoSolv ( const Pathname &  file_r,
const std::string &  name_r 
)

Load Solvables from a solv-file into a Repository named name_r.

In case of an exception the Repository is removed from the Pool.

Exceptions
Exceptionif loading the solv-file fails.
See Also
Repository::EraseFromPool

Definition at line 164 of file Pool.cc.

Repository zypp::sat::Pool::addRepoSolv ( const Pathname &  file_r)

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 176 of file Pool.cc.

Repository zypp::sat::Pool::addRepoSolv ( const Pathname &  file_r,
const RepoInfo info_r 
)

Definition at line 179 of file Pool.cc.

Repository zypp::sat::Pool::addRepoHelix ( const Pathname &  file_r,
const std::string &  name_r 
)

Load Solvables from a helix-file into a Repository named name_r.

Supports loading of gzip compressed files (.gz). In case of an exception the Repository is removed from the Pool.

Exceptions
Exceptionif loading the helix-file fails.
See Also
Repository::EraseFromPool

Definition at line 188 of file Pool.cc.

Repository zypp::sat::Pool::addRepoHelix ( const Pathname &  file_r)

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 200 of file Pool.cc.

Repository zypp::sat::Pool::addRepoHelix ( const Pathname &  file_r,
const RepoInfo info_r 
)

Definition at line 203 of file Pool.cc.

bool zypp::sat::Pool::solvablesEmpty ( ) const

Whether Pool contains solvables.

Definition at line 90 of file Pool.cc.

Pool::size_type zypp::sat::Pool::solvablesSize ( ) const

Number of solvables in Pool.

Definition at line 103 of file Pool.cc.

Pool::SolvableIterator zypp::sat::Pool::solvablesBegin ( ) const

Iterator to the first Solvable.

Definition at line 116 of file Pool.cc.

Pool::SolvableIterator zypp::sat::Pool::solvablesEnd ( ) const

Iterator behind the last Solvable.

Definition at line 119 of file Pool.cc.

Iterable<SolvableIterator> zypp::sat::Pool::solvables ( ) const
inline

Iterate the solvables.

Definition at line 166 of file Pool.h.

template<class TFilter >
filter_iterator<TFilter,SolvableIterator> zypp::sat::Pool::filterBegin ( const TFilter &  filter_r) const
inline

Definition at line 173 of file Pool.h.

template<class TFilter >
filter_iterator<TFilter,SolvableIterator> zypp::sat::Pool::filterEnd ( const TFilter &  filter_r) const
inline

Definition at line 177 of file Pool.h.

WhatProvides zypp::sat::Pool::whatProvides ( Capability  cap_r) const
inline

Conainer of all Solvable providing cap_r.

Definition at line 183 of file Pool.h.

void zypp::sat::Pool::setTextLocale ( const Locale locale_r)

Set the default language for retrieving translated texts.

Updated when calling ZConfig::setTextLocale.

Definition at line 212 of file Pool.cc.

void zypp::sat::Pool::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 215 of file Pool.cc.

bool zypp::sat::Pool::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 218 of file Pool.cc.

bool zypp::sat::Pool::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 221 of file Pool.cc.

const LocaleSet & zypp::sat::Pool::getRequestedLocales ( ) const

Return the requested locales.

See Also
setRequestedLocales

Definition at line 224 of file Pool.cc.

bool zypp::sat::Pool::isRequestedLocale ( const Locale locale_r) const

Whether this Locale is in the set of requested locales.

Definition at line 227 of file Pool.cc.

void zypp::sat::Pool::initRequestedLocales ( const LocaleSet locales_r)

Start tracking changes based on this locales_r.

Definition at line 230 of file Pool.cc.

const LocaleSet & zypp::sat::Pool::getAddedRequestedLocales ( ) const

Added since last initRequestedLocales.

Definition at line 231 of file Pool.cc.

const LocaleSet & zypp::sat::Pool::getRemovedRequestedLocales ( ) const

Removed since last initRequestedLocales.

Definition at line 232 of file Pool.cc.

const LocaleSet & zypp::sat::Pool::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 234 of file Pool.cc.

bool zypp::sat::Pool::isAvailableLocale ( const Locale locale_r) const

Whether this Locale is in the set of available locales.

Definition at line 237 of file Pool.cc.

const Pool::MultiversionList & zypp::sat::Pool::multiversion ( ) const

Definition at line 240 of file Pool.cc.

ZYPP_DEPRECATED bool zypp::sat::Pool::multiversionEmpty ( ) const
inline
Deprecated:
Legacy, use multiversion().empty() instead.

Definition at line 249 of file Pool.h.

Queue zypp::sat::Pool::autoInstalled ( ) const

Get ident list of all autoinstalled solvables.

Definition at line 243 of file Pool.cc.

void zypp::sat::Pool::setAutoInstalled ( const Queue autoInstalled_r)

Set ident list of all autoinstalled solvables.

Definition at line 244 of file Pool.cc.

detail::CPool * zypp::sat::Pool::get ( ) const

Expert backdoor.

Definition at line 49 of file Pool.cc.

Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const Pool obj 
)
related

Stream output

Definition at line 251 of file Pool.cc.

bool operator== ( const Pool lhs,
const Pool rhs 
)
related

Definition at line 274 of file Pool.h.

bool operator!= ( const Pool lhs,
const Pool rhs 
)
related

Definition at line 278 of file Pool.h.


The documentation for this class was generated from the following files: