libzypp  14.29.1
zypp::sat::detail::PoolImpl Class Reference

#include <PoolImpl.h>

Inheritance diagram for zypp::sat::detail::PoolImpl:

Public Member Functions

 PoolImpl ()
 Default ctor. More...
 
 ~PoolImpl ()
 Dtor. More...
 
::_Pool * operator-> ()
 Pointer style access forwarded to sat-pool. More...
 
const SerialNumberserial () const
 Serial number changing whenever the content changes. More...
 
void prepare () const
 Update housekeeping data (e.g. More...
 
void prepareForSolving () const
 prepare plus some expensive checks done before solving only. More...
 
bool isSystemRepo (::_Repo *repo_r) const
 
::_Repo * systemRepo () const
 
void _postRepoAdd (::_Repo *repo_r)
 Helper postprocessing the repo after adding solv or helix files. More...
 
bool validSolvable (const ::_Solvable &slv_r) const
 a valid Solvable has a non NULL repo pointer. More...
 
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. More...
 
SolvableIdType getFirstId () const
 Get id of the first valid Solvable. More...
 
SolvableIdType getNextId (SolvableIdType id_r) const
 Get id of the next valid Solvable. More...
 
const RepoInforepoInfo (RepoIdType id_r)
 
void setRepoInfo (RepoIdType id_r, const RepoInfo &info_r)
 Also adjust repo priority and subpriority accordingly. More...
 
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. More...
 
unsigned whatProvides (Capability cap_r)
 Returns offset into the internal whatprovidesdata array. More...
 
const std::set< std::string > & requiredFilesystems () const
 accessor for etc/sysconfig/storage reading file on demand More...
 
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. More...
 
void _deleteRepo (::_Repo *repo_r)
 Creating a new repo named name_r. More...
 
int _addSolv (::_Repo *repo_r, FILE *file_r)
 Adding solv file to a repo. More...
 
int _addHelix (::_Repo *repo_r, FILE *file_r)
 Adding helix file to a repo. More...
 
detail::SolvableIdType _addSolvables (::_Repo *repo_r, unsigned count_r)
 Adding Solvables to a repo. More...
 
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 LocaleSetgetRequestedLocales () const
 
bool isRequestedLocale (const Locale &locale_r) const
 
const LocaleSetgetAvailableLocales () const
 
bool isAvailableLocale (const Locale &locale_r) const
 
Installed on behalf of a user request hint.
StringQueue autoInstalled () const
 Get ident list of all autoinstalled solvables. More...
 
void setAutoInstalled (const StringQueue &autoInstalled_r)
 Set ident list of all autoinstalled solvables. More...
 
bool isOnSystemByUser (IdString ident_r) const
 

Static Public Member Functions

static const std::string & systemRepoAlias ()
 Reserved system repository alias . More...
 

Private Member Functions

void setDirty (const char *a1=0, const char *a2=0, const char *a3=0)
 Invalidate housekeeping data (e.g. More...
 
void depSetDirty (const char *a1=0, const char *a2=0, const char *a3=0)
 Invalidate housekeeping data (e.g. More...
 
void multiversionListInit () 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.). More...
 

Private Attributes

::_Pool * _pool
 sat-pool. More...
 
SerialNumber _serial
 Serial number. More...
 
SerialNumberWatcher _watcher
 Watch serial number. More...
 
std::map< RepoIdType, RepoInfo_repoinfos
 Additional RepoInfo. More...
 
LocaleSet _requestedLocales
 
scoped_ptr< LocaleSet_availableLocalesPtr
 
std::tr1::unordered_set< IdString_locale2Solver
 
scoped_ptr< MultiversionList_multiversionListPtr
 
sat::StringQueue _autoinstalled
 
scoped_ptr< std::set
< std::string > > 
_requiredFilesystemsPtr
 filesystems mentioned in /etc/sysconfig/storage More...
 

Multiversion install.

typedef IdStringSet MultiversionList
 
const MultiversionListmultiversionList () const
 
bool isMultiversion (IdString ident_r) const
 

Detailed Description

Definition at line 49 of file PoolImpl.h.

Member Typedef Documentation

Constructor & Destructor Documentation

zypp::sat::detail::PoolImpl::PoolImpl ( )

Default ctor.

Definition at line 178 of file PoolImpl.cc.

zypp::sat::detail::PoolImpl::~PoolImpl ( )

Dtor.

Definition at line 213 of file PoolImpl.cc.

Member Function Documentation

::_Pool* zypp::sat::detail::PoolImpl::operator-> ( )
inline

Pointer style access forwarded to sat-pool.

Definition at line 59 of file PoolImpl.h.

const SerialNumber& zypp::sat::detail::PoolImpl::serial ( ) const
inline

Serial number changing whenever the content changes.

Definition at line 64 of file PoolImpl.h.

void zypp::sat::detail::PoolImpl::prepare ( ) const

Update housekeeping data (e.g.

whatprovides).

Todo:
actually requires a watcher.

Definition at line 247 of file PoolImpl.cc.

void zypp::sat::detail::PoolImpl::prepareForSolving ( ) const

prepare plus some expensive checks done before solving only.

Definition at line 269 of file PoolImpl.cc.

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 220 of file PoolImpl.cc.

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 236 of file PoolImpl.cc.

detail::IdType zypp::sat::detail::PoolImpl::nsCallback ( ::_Pool *  ,
void *  data,
detail::IdType  lhs,
detail::IdType  rhs 
)
staticprivate

Callback to resolve namespace dependencies (language, modalias, filesystem, etc.).

Definition at line 115 of file PoolImpl.cc.

const std::string & zypp::sat::detail::PoolImpl::systemRepoAlias ( )
static

Reserved system repository alias .

Definition at line 89 of file PoolImpl.cc.

bool zypp::sat::detail::PoolImpl::isSystemRepo ( ::_Repo *  repo_r) const
inline

Definition at line 91 of file PoolImpl.h.

::_Repo* zypp::sat::detail::PoolImpl::systemRepo ( ) const
inline

Definition at line 94 of file PoolImpl.h.

_Repo * zypp::sat::detail::PoolImpl::_createRepo ( const std::string &  name_r)

Creating a new repo named name_r.

Definition at line 284 of file PoolImpl.cc.

void zypp::sat::detail::PoolImpl::_deleteRepo ( ::_Repo *  repo_r)

Creating a new repo named name_r.

Definition at line 293 of file PoolImpl.cc.

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 302 of file PoolImpl.cc.

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 311 of file PoolImpl.cc.

detail::SolvableIdType zypp::sat::detail::PoolImpl::_addSolvables ( ::_Repo *  repo_r,
unsigned  count_r 
)

Adding Solvables to a repo.

Definition at line 364 of file PoolImpl.cc.

void zypp::sat::detail::PoolImpl::_postRepoAdd ( ::_Repo *  repo_r)

Helper postprocessing the repo after adding solv or helix files.

Definition at line 320 of file PoolImpl.cc.

bool zypp::sat::detail::PoolImpl::validSolvable ( const ::_Solvable &  slv_r) const
inline

a valid Solvable has a non NULL repo pointer.

Definition at line 130 of file PoolImpl.h.

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 133 of file PoolImpl.h.

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 136 of file PoolImpl.h.

::_Pool* zypp::sat::detail::PoolImpl::getPool ( ) const
inline

Definition at line 140 of file PoolImpl.h.

::_Repo* zypp::sat::detail::PoolImpl::getRepo ( RepoIdType  id_r) const
inline
Todo:
a quick check whether the repo was meanwhile deleted.

Definition at line 144 of file PoolImpl.h.

::_Solvable* zypp::sat::detail::PoolImpl::getSolvable ( SolvableIdType  id_r) const
inline

Return pointer to the sat-solvable or NULL if it is not valid.

See also
validSolvable.

Definition at line 150 of file PoolImpl.h.

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 161 of file PoolImpl.h.

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.

See also
validSolvable.

Definition at line 169 of file PoolImpl.h.

const RepoInfo& zypp::sat::detail::PoolImpl::repoInfo ( RepoIdType  id_r)
inline

Definition at line 181 of file PoolImpl.h.

void zypp::sat::detail::PoolImpl::setRepoInfo ( RepoIdType  id_r,
const RepoInfo info_r 
)

Also adjust repo priority and subpriority accordingly.

Definition at line 370 of file PoolImpl.cc.

void zypp::sat::detail::PoolImpl::eraseRepoInfo ( RepoIdType  id_r)
inline

Definition at line 186 of file PoolImpl.h.

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 193 of file PoolImpl.h.

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 199 of file PoolImpl.h.

void zypp::sat::detail::PoolImpl::setTextLocale ( const Locale locale_r)

Definition at line 415 of file PoolImpl.cc.

void zypp::sat::detail::PoolImpl::setRequestedLocales ( const LocaleSet locales_r)

Definition at line 432 of file PoolImpl.cc.

bool zypp::sat::detail::PoolImpl::addRequestedLocale ( const Locale locale_r)

Definition at line 440 of file PoolImpl.cc.

bool zypp::sat::detail::PoolImpl::eraseRequestedLocale ( const Locale locale_r)

Definition at line 451 of file PoolImpl.cc.

const LocaleSet& zypp::sat::detail::PoolImpl::getRequestedLocales ( ) const
inline

Definition at line 210 of file PoolImpl.h.

bool zypp::sat::detail::PoolImpl::isRequestedLocale ( const Locale locale_r) const
inline

Definition at line 213 of file PoolImpl.h.

const LocaleSet & zypp::sat::detail::PoolImpl::getAvailableLocales ( ) const

Definition at line 492 of file PoolImpl.cc.

bool zypp::sat::detail::PoolImpl::isAvailableLocale ( const Locale locale_r) const
inline

Definition at line 221 of file PoolImpl.h.

const MultiversionList& zypp::sat::detail::PoolImpl::multiversionList ( ) const
inline

Definition at line 234 of file PoolImpl.h.

bool zypp::sat::detail::PoolImpl::isMultiversion ( IdString  ident_r) const
inline

Definition at line 241 of file PoolImpl.h.

StringQueue zypp::sat::detail::PoolImpl::autoInstalled ( ) const
inline

Get ident list of all autoinstalled solvables.

Definition at line 252 of file PoolImpl.h.

void zypp::sat::detail::PoolImpl::setAutoInstalled ( const StringQueue autoInstalled_r)
inline

Set ident list of all autoinstalled solvables.

Definition at line 256 of file PoolImpl.h.

bool zypp::sat::detail::PoolImpl::isOnSystemByUser ( IdString  ident_r) const
inline

Definition at line 259 of file PoolImpl.h.

const std::set< std::string > & zypp::sat::detail::PoolImpl::requiredFilesystems ( ) const

accessor for etc/sysconfig/storage reading file on demand

Definition at line 550 of file PoolImpl.cc.

void zypp::sat::detail::PoolImpl::multiversionListInit ( ) const
private

Definition at line 517 of file PoolImpl.cc.

Member Data Documentation

::_Pool* zypp::sat::detail::PoolImpl::_pool
private

sat-pool.

Definition at line 269 of file PoolImpl.h.

SerialNumber zypp::sat::detail::PoolImpl::_serial
private

Serial number.

Definition at line 271 of file PoolImpl.h.

SerialNumberWatcher zypp::sat::detail::PoolImpl::_watcher
private

Watch serial number.

Definition at line 273 of file PoolImpl.h.

std::map<RepoIdType,RepoInfo> zypp::sat::detail::PoolImpl::_repoinfos
private

Additional RepoInfo.

Definition at line 275 of file PoolImpl.h.

LocaleSet zypp::sat::detail::PoolImpl::_requestedLocales
private

Definition at line 278 of file PoolImpl.h.

scoped_ptr<LocaleSet> zypp::sat::detail::PoolImpl::_availableLocalesPtr
mutableprivate

Definition at line 279 of file PoolImpl.h.

std::tr1::unordered_set<IdString> zypp::sat::detail::PoolImpl::_locale2Solver
mutableprivate

Definition at line 280 of file PoolImpl.h.

scoped_ptr<MultiversionList> zypp::sat::detail::PoolImpl::_multiversionListPtr
mutableprivate

Definition at line 284 of file PoolImpl.h.

sat::StringQueue zypp::sat::detail::PoolImpl::_autoinstalled
private

Definition at line 287 of file PoolImpl.h.

scoped_ptr<std::set<std::string> > zypp::sat::detail::PoolImpl::_requiredFilesystemsPtr
mutableprivate

filesystems mentioned in /etc/sysconfig/storage

Definition at line 290 of file PoolImpl.h.


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