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

#include <sat/detail/PoolImpl.h>

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

Public Member Functions

 PoolImpl ()
 Default ctor. More...
 
 ~PoolImpl ()
 Dtor. More...
 
CPooloperator-> ()
 Pointer style access forwarded to sat-pool. More...
 
const SerialNumberserial () const
 Serial number changing whenever the content changes. More...
 
const SerialNumberserialIDs () const
 Serial number changing whenever resusePoolIDs==true was used. More...
 
void prepare () const
 Update housekeeping data (e.g. More...
 
bool isSystemRepo (CRepo *repo_r) const
 
CReposystemRepo () const
 
Pathname rootDir () const
 Get rootdir (for file conflicts check) More...
 
void rootDir (const Pathname &root_r)
 Set rootdir (for file conflicts check) More...
 
Actions invalidating housekeeping data.

All methods expect valid arguments being passed.

CRepo_createRepo (const std::string &name_r)
 Creating a new repo named name_r. More...
 
void _deleteRepo (CRepo *repo_r)
 Delete repo repo_r from pool. More...
 
int _addSolv (CRepo *repo_r, FILE *file_r)
 Adding solv file to a repo. More...
 
int _addHelix (CRepo *repo_r, FILE *file_r)
 Adding helix file to a repo. More...
 
int _addTesttags (CRepo *repo_r, FILE *file_r)
 Adding testtags file to a repo. More...
 
detail::SolvableIdType _addSolvables (CRepo *repo_r, unsigned count_r)
 Adding Solvables to a repo. More...
 
void _postRepoAdd (CRepo *repo_r)
 Helper postprocessing the repo after adding solv or helix files. More...
 
bool validSolvable (const CSolvable &slv_r) const
 a valid Solvable has a non NULL repo pointer. More...
 
bool validSolvable (SolvableIdType id_r) const
 
bool validSolvable (const CSolvable *slv_r) const
 
CPoolgetPool () const
 
CRepogetRepo (RepoIdType id_r) const
 
CSolvablegetSolvable (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...
 
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
 
bool isOnSystemByAuto (IdString ident_r) const
 
Solvables which should trigger the reboot-needed hint if installed/updated.
void setNeedrebootSpec (sat::SolvableSpec needrebootSpec_r)
 Set new Solvable specs. More...
 
bool isNeedreboot (const Solvable &solv_r) const
 Whether solv_r matches the spec. More...
 

Static Public Member Functions

static const std::string & systemRepoAlias ()
 Reserved system repository alias @System . 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 localeSetDirty (const char *a1=0, const char *a2=0, const char *a3=0)
 Invalidate locale related housekeeping data. More...
 
void depSetDirty (const char *a1=0, const char *a2=0, const char *a3=0)
 Invalidate housekeeping data (e.g. More...
 

Static Private Member Functions

static detail::IdType nsCallback (CPool *, void *data, detail::IdType lhs, detail::IdType rhs)
 Callback to resolve namespace dependencies (language, modalias, filesystem, etc.). More...
 

Requested locales.

The requested LocaleSets managed in _requestedLocalesTracker are unexpanded; i.e.

they contain just the pure user selection. The resolver however uses expanded sets ('de_DE' will also include its fallback locales 'de', (en); here in the namespace: callback and in the Resolver itself).

typedef base::SetTracker< IdStringSetTrackedLocaleIds
 
void setTextLocale (const Locale &locale_r)
 
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 LocaleSetgetRequestedLocales () const
 Current set of requested Locales. More...
 
bool isRequestedLocale (const Locale &locale_r) const
 
void setRequestedLocales (const LocaleSet &locales_r)
 User change (tracked). More...
 
bool addRequestedLocale (const Locale &locale_r)
 User change (tracked). More...
 
bool eraseRequestedLocale (const Locale &locale_r)
 User change (tracked). More...
 
const LocaleSetgetAvailableLocales () const
 All Locales occurring in any repo. More...
 
bool isAvailableLocale (const Locale &locale_r) const
 
const TrackedLocaleIdstrackedLocaleIds () const
 Expanded _requestedLocalesTracker for solver. More...
 

Multiversion install.

typedef SolvableSet MultiversionList
 
const MultiversionListmultiversionList () const
 
bool isMultiversion (const Solvable &solv_r) const
 
void multiversionSpecChanged ()
 

Blacklisted Solvables.

CPool_pool
 sat-pool. More...
 
SerialNumber _serial
 Serial number - changes with each Pool content change. More...
 
SerialNumber _serialIDs
 Serial number of IDs - changes whenever resusePoolIDs==true - ResPool must also invalidate it's PoolItems! More...
 
SerialNumberWatcher _watcher
 Watch serial number. More...
 
std::map< RepoIdType, RepoInfo_repoinfos
 Additional RepoInfo. More...
 
base::SetTracker< LocaleSet_requestedLocalesTracker
 
scoped_ptr< TrackedLocaleIds_trackedLocaleIdsPtr
 
scoped_ptr< LocaleSet_availableLocalesPtr
 
scoped_ptr< MultiversionList_multiversionListPtr
 
sat::StringQueue _autoinstalled
 
sat::SolvableSpec _needrebootSpec
 Solvables which should trigger the reboot-needed hint if installed/updated. More...
 
sat::SolvableSpec _retractedSpec
 Blacklisted specs: More...
 
sat::SolvableSpec _ptfMasterSpec
 
sat::SolvableSpec _ptfPackageSpec
 
scoped_ptr< std::set< std::string > > _requiredFilesystemsPtr
 filesystems mentioned in /etc/sysconfig/storage More...
 
bool isRetracted (const Solvable &solv_r) const
 
bool isPtfMaster (const Solvable &solv_r) const
 
bool isPtfPackage (const Solvable &solv_r) const
 
const std::set< std::string > & requiredFilesystems () const
 accessor for etc/sysconfig/storage reading file on demand More...
 
void multiversionListInit () const
 

Detailed Description

Definition at line 52 of file PoolImpl.h.

Member Typedef Documentation

◆ TrackedLocaleIds

◆ MultiversionList

Constructor & Destructor Documentation

◆ PoolImpl()

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

Default ctor.

Definition at line 189 of file PoolImpl.cc.

◆ ~PoolImpl()

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

Dtor.

Definition at line 234 of file PoolImpl.cc.

Member Function Documentation

◆ operator->()

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

Pointer style access forwarded to sat-pool.

Definition at line 62 of file PoolImpl.h.

◆ serial()

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

Serial number changing whenever the content changes.

Definition at line 67 of file PoolImpl.h.

◆ serialIDs()

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

Serial number changing whenever resusePoolIDs==true was used.

ResPool must also invalidate it's PoolItems!

Definition at line 71 of file PoolImpl.h.

◆ prepare()

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

Update housekeeping data (e.g.

whatprovides).

Todo:
actually requires a watcher.

Definition at line 291 of file PoolImpl.cc.

◆ setDirty()

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

◆ localeSetDirty()

void zypp::sat::detail::PoolImpl::localeSetDirty ( const char *  a1 = 0,
const char *  a2 = 0,
const char *  a3 = 0 
)
private

Invalidate locale related housekeeping data.

Definition at line 268 of file PoolImpl.cc.

◆ depSetDirty()

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

◆ nsCallback()

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

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

Definition at line 131 of file PoolImpl.cc.

◆ systemRepoAlias()

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

Reserved system repository alias @System .

Definition at line 96 of file PoolImpl.cc.

◆ isSystemRepo()

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

Definition at line 100 of file PoolImpl.h.

◆ systemRepo()

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

Definition at line 103 of file PoolImpl.h.

◆ rootDir() [1/2]

Pathname zypp::sat::detail::PoolImpl::rootDir ( ) const
inline

Get rootdir (for file conflicts check)

Definition at line 107 of file PoolImpl.h.

◆ rootDir() [2/2]

void zypp::sat::detail::PoolImpl::rootDir ( const Pathname root_r)
inline

Set rootdir (for file conflicts check)

Definition at line 114 of file PoolImpl.h.

◆ _createRepo()

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

Creating a new repo named name_r.

Definition at line 322 of file PoolImpl.cc.

◆ _deleteRepo()

void zypp::sat::detail::PoolImpl::_deleteRepo ( CRepo repo_r)

Delete repo repo_r from pool.

Definition at line 331 of file PoolImpl.cc.

◆ _addSolv()

int zypp::sat::detail::PoolImpl::_addSolv ( CRepo 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 347 of file PoolImpl.cc.

◆ _addHelix()

int zypp::sat::detail::PoolImpl::_addHelix ( CRepo 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 356 of file PoolImpl.cc.

◆ _addTesttags()

int zypp::sat::detail::PoolImpl::_addTesttags ( CRepo repo_r,
FILE *  file_r 
)

Adding testtags file to a repo.

Except for isSystemRepo_r, solvables of incompatible architecture are filtered out.

Definition at line 365 of file PoolImpl.cc.

◆ _addSolvables()

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

Adding Solvables to a repo.

Definition at line 418 of file PoolImpl.cc.

◆ _postRepoAdd()

void zypp::sat::detail::PoolImpl::_postRepoAdd ( CRepo repo_r)

Helper postprocessing the repo after adding solv or helix files.

Definition at line 374 of file PoolImpl.cc.

◆ validSolvable() [1/3]

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

a valid Solvable has a non NULL repo pointer.

Definition at line 161 of file PoolImpl.h.

◆ validSolvable() [2/3]

bool zypp::sat::detail::PoolImpl::validSolvable ( SolvableIdType  id_r) const
inline

Definition at line 164 of file PoolImpl.h.

◆ validSolvable() [3/3]

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

Definition at line 167 of file PoolImpl.h.

◆ getPool()

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

Definition at line 171 of file PoolImpl.h.

◆ getRepo()

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

Definition at line 175 of file PoolImpl.h.

◆ getSolvable()

CSolvable* 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 181 of file PoolImpl.h.

◆ getFirstId()

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

◆ 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.

See also
validSolvable.

Definition at line 200 of file PoolImpl.h.

◆ repoInfo()

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

Definition at line 212 of file PoolImpl.h.

◆ setRepoInfo()

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

Also adjust repo priority and subpriority accordingly.

Definition at line 424 of file PoolImpl.cc.

◆ eraseRepoInfo()

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

Definition at line 217 of file PoolImpl.h.

◆ whatProvidesData()

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

◆ whatProvides()

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

◆ setTextLocale()

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

Definition at line 456 of file PoolImpl.cc.

◆ initRequestedLocales()

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

Start tracking changes based on this locales_r.

Usually called on TargetInit.

Definition at line 481 of file PoolImpl.cc.

◆ getAddedRequestedLocales()

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

Added since last initRequestedLocales.

Definition at line 251 of file PoolImpl.h.

◆ getRemovedRequestedLocales()

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

Removed since last initRequestedLocales.

Definition at line 255 of file PoolImpl.h.

◆ getRequestedLocales()

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

Current set of requested Locales.

Definition at line 259 of file PoolImpl.h.

◆ isRequestedLocale()

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

Definition at line 262 of file PoolImpl.h.

◆ setRequestedLocales()

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

User change (tracked).

Definition at line 490 of file PoolImpl.cc.

◆ addRequestedLocale()

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

User change (tracked).

Definition at line 499 of file PoolImpl.cc.

◆ eraseRequestedLocale()

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

User change (tracked).

Definition at line 510 of file PoolImpl.cc.

◆ getAvailableLocales()

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

All Locales occurring in any repo.

Definition at line 593 of file PoolImpl.cc.

◆ isAvailableLocale()

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

Definition at line 275 of file PoolImpl.h.

◆ trackedLocaleIds()

const PoolImpl::TrackedLocaleIds & zypp::sat::detail::PoolImpl::trackedLocaleIds ( ) const

Expanded _requestedLocalesTracker for solver.

Definition at line 522 of file PoolImpl.cc.

◆ multiversionList()

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

Definition at line 639 of file PoolImpl.cc.

◆ isMultiversion()

bool zypp::sat::detail::PoolImpl::isMultiversion ( const Solvable solv_r) const

Definition at line 646 of file PoolImpl.cc.

◆ multiversionSpecChanged()

void zypp::sat::detail::PoolImpl::multiversionSpecChanged ( )

Definition at line 636 of file PoolImpl.cc.

◆ autoInstalled()

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

Get ident list of all autoinstalled solvables.

Definition at line 304 of file PoolImpl.h.

◆ setAutoInstalled()

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

Set ident list of all autoinstalled solvables.

Definition at line 308 of file PoolImpl.h.

◆ isOnSystemByUser()

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

Definition at line 311 of file PoolImpl.h.

◆ isOnSystemByAuto()

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

Definition at line 314 of file PoolImpl.h.

◆ setNeedrebootSpec()

void zypp::sat::detail::PoolImpl::setNeedrebootSpec ( sat::SolvableSpec  needrebootSpec_r)
inline

Set new Solvable specs.

Definition at line 322 of file PoolImpl.h.

◆ isNeedreboot()

bool zypp::sat::detail::PoolImpl::isNeedreboot ( const Solvable solv_r) const
inline

Whether solv_r matches the spec.

Definition at line 329 of file PoolImpl.h.

◆ isRetracted()

bool zypp::sat::detail::PoolImpl::isRetracted ( const Solvable solv_r) const
inline

Definition at line 336 of file PoolImpl.h.

◆ isPtfMaster()

bool zypp::sat::detail::PoolImpl::isPtfMaster ( const Solvable solv_r) const
inline

Definition at line 338 of file PoolImpl.h.

◆ isPtfPackage()

bool zypp::sat::detail::PoolImpl::isPtfPackage ( const Solvable solv_r) const
inline

Definition at line 340 of file PoolImpl.h.

◆ requiredFilesystems()

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

accessor for etc/sysconfig/storage reading file on demand

Definition at line 651 of file PoolImpl.cc.

◆ multiversionListInit()

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

Definition at line 613 of file PoolImpl.cc.

Member Data Documentation

◆ _pool

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

sat-pool.

Definition at line 350 of file PoolImpl.h.

◆ _serial

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

Serial number - changes with each Pool content change.

Definition at line 352 of file PoolImpl.h.

◆ _serialIDs

SerialNumber zypp::sat::detail::PoolImpl::_serialIDs
private

Serial number of IDs - changes whenever resusePoolIDs==true - ResPool must also invalidate it's PoolItems!

Definition at line 354 of file PoolImpl.h.

◆ _watcher

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

Watch serial number.

Definition at line 356 of file PoolImpl.h.

◆ _repoinfos

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

Additional RepoInfo.

Definition at line 358 of file PoolImpl.h.

◆ _requestedLocalesTracker

base::SetTracker<LocaleSet> zypp::sat::detail::PoolImpl::_requestedLocalesTracker
private

Definition at line 361 of file PoolImpl.h.

◆ _trackedLocaleIdsPtr

scoped_ptr<TrackedLocaleIds> zypp::sat::detail::PoolImpl::_trackedLocaleIdsPtr
mutableprivate

Definition at line 362 of file PoolImpl.h.

◆ _availableLocalesPtr

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

Definition at line 364 of file PoolImpl.h.

◆ _multiversionListPtr

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

Definition at line 368 of file PoolImpl.h.

◆ _autoinstalled

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

Definition at line 371 of file PoolImpl.h.

◆ _needrebootSpec

sat::SolvableSpec zypp::sat::detail::PoolImpl::_needrebootSpec
private

Solvables which should trigger the reboot-needed hint if installed/updated.

Definition at line 374 of file PoolImpl.h.

◆ _retractedSpec

sat::SolvableSpec zypp::sat::detail::PoolImpl::_retractedSpec
private

Blacklisted specs:

Definition at line 377 of file PoolImpl.h.

◆ _ptfMasterSpec

sat::SolvableSpec zypp::sat::detail::PoolImpl::_ptfMasterSpec
private

Definition at line 378 of file PoolImpl.h.

◆ _ptfPackageSpec

sat::SolvableSpec zypp::sat::detail::PoolImpl::_ptfPackageSpec
private

Definition at line 379 of file PoolImpl.h.

◆ _requiredFilesystemsPtr

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

filesystems mentioned in /etc/sysconfig/storage

Definition at line 382 of file PoolImpl.h.


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