12#ifndef ZYPP_SAT_DETAIL_POOLIMPL_H
13#define ZYPP_SAT_DETAIL_POOLIMPL_H
18#include <solv/solvable.h>
19#include <solv/poolarch.h>
20#include <solv/repo_solv.h>
21#include <solv/pool_parserpmrichdep.h>
25#include <zypp/base/Hash.h>
26#include <zypp/base/NonCopyable.h>
84 void setDirty(
const char * a1 = 0,
const char * a2 = 0,
const char * a3 = 0 );
88 void localeSetDirty(
const char * a1 = 0,
const char * a2 = 0,
const char * a3 = 0 );
92 void depSetDirty(
const char * a1 = 0,
const char * a2 = 0,
const char * a3 = 0 );
102 {
return repo_r &&
_pool->installed == repo_r; }
105 {
return _pool->installed; }
110 const char * rd = ::pool_get_rootdir(
_pool );
111 return( rd ? rd :
"/" );
117 if ( root_r.
empty() || root_r ==
"/" )
118 ::pool_set_rootdir(
_pool,
nullptr );
163 {
return slv_r.repo; }
185 return &
_pool->solvables[id_r];
192 { return ::pool_parserpmrichdep(
_pool, capstr_r ); }
208 for( ++id_r; id_r < unsigned(
_pool->nsolvables); ++id_r )
231 {
return _pool->whatprovidesdata[offset_r]; }
284 LocaleSet::const_iterator it( avl.find( locale_r ) );
285 return it != avl.end();
sat::detail::IdType id() const
Expert backdoor.
Access to the sat-pools string space.
IdType id() const
Expert backdoor.
'Language[_Country]' codes.
What is known about a repository.
Simple serial number watcher.
Simple serial number provider.
const char * c_str() const
String representation.
bool empty() const
Test for an empty path.
Libsolv Id queue wrapper.
bool contains(value_type val_r) const
Return whether the Queue contais at lest one element with value val_r.
Solvable set wrapper to allow adding additional convenience iterators.
Define a set of Solvables by ident and provides.
bool contains(const sat::Solvable &solv_r) const
Test whether solv_r matches the spec.
void setDirty() const
Explicitly flag the cache as dirty, so it will be rebuilt on the next request.
A Solvable object within the sat Pool.
sat::SolvableSpec _needrebootSpec
Solvables which should trigger the reboot-needed hint if installed/updated.
CPool * operator->()
Pointer style access forwarded to sat-pool.
scoped_ptr< TrackedLocaleIds > _trackedLocaleIdsPtr
base::SetTracker< IdStringSet > TrackedLocaleIds
sat::SolvableSpec _retractedSpec
Blacklisted specs:
scoped_ptr< LocaleSet > _availableLocalesPtr
CRepo * systemRepo() const
bool isPtfMaster(const Solvable &solv_r) const
Pathname rootDir() const
Get rootdir (for file conflicts check)
scoped_ptr< MultiversionList > _multiversionListPtr
StringQueue autoInstalled() const
Get ident list of all autoinstalled solvables.
bool isSystemRepo(CRepo *repo_r) const
static detail::IdType nsCallback(CPool *, void *data, detail::IdType lhs, detail::IdType rhs)
Callback to resolve namespace dependencies (language, modalias, filesystem, etc.).
CRepo * getRepo(RepoIdType id_r) const
void setTextLocale(const Locale &locale_r)
void initRequestedLocales(const LocaleSet &locales_r)
Start tracking changes based on this locales_r.
sat::StringQueue _autoinstalled
int _addTesttags(CRepo *repo_r, FILE *file_r)
Adding testtags file to a repo.
unsigned whatProvides(Capability cap_r)
Returns offset into the internal whatprovidesdata array.
void multiversionListInit() const
const RepoInfo & repoInfo(RepoIdType id_r)
bool isPtfPackage(const Solvable &solv_r) const
const LocaleSet & getAvailableLocales() const
All Locales occurring in any repo.
bool isRequestedLocale(const Locale &locale_r) const
const SerialNumber & serialIDs() const
Serial number changing whenever resusePoolIDs==true was used.
std::map< RepoIdType, RepoInfo > _repoinfos
Additional RepoInfo.
void _deleteRepo(CRepo *repo_r)
Delete repo repo_r from pool.
bool eraseRequestedLocale(const Locale &locale_r)
User change (tracked).
const LocaleSet & getRequestedLocales() const
Current set of requested Locales.
sat::SolvableSpec _ptfMasterSpec
void eraseRepoInfo(RepoIdType id_r)
const TrackedLocaleIds & trackedLocaleIds() const
Expanded _requestedLocalesTracker for solver.
const sat::detail::IdType whatProvidesData(unsigned offset_r)
Returns the id stored at offset_r in the internal whatprovidesdata array.
void rootDir(const Pathname &root_r)
Set rootdir (for file conflicts check)
bool validSolvable(SolvableIdType id_r) const
void localeSetDirty(const char *a1=0, const char *a2=0, const char *a3=0)
Invalidate locale related housekeeping data.
scoped_ptr< std::set< std::string > > _requiredFilesystemsPtr
filesystems mentioned in /etc/sysconfig/storage
base::SetTracker< LocaleSet > _requestedLocalesTracker
void setRequestedLocales(const LocaleSet &locales_r)
User change (tracked).
const LocaleSet & getRemovedRequestedLocales() const
Removed since last initRequestedLocales.
void setNeedrebootSpec(sat::SolvableSpec needrebootSpec_r)
Set new Solvable specs.
const MultiversionList & multiversionList() const
bool isAvailableLocale(const Locale &locale_r) const
CRepo * _createRepo(const std::string &name_r)
Creating a new repo named name_r.
SerialNumberWatcher _watcher
Watch serial number.
bool isNeedreboot(const Solvable &solv_r) const
Whether solv_r matches the spec.
bool validSolvable(const CSolvable *slv_r) const
sat::detail::IdType parserpmrichdep(const char *capstr_r)
libsolv capability parser
SerialNumber _serial
Serial number - changes with each Pool content change.
const std::set< std::string > & requiredFilesystems() const
accessor for etc/sysconfig/storage reading file on demand
void _postRepoAdd(CRepo *repo_r)
Helper postprocessing the repo after adding solv or helix files.
const LocaleSet & getAddedRequestedLocales() const
Added since last initRequestedLocales.
bool isOnSystemByAuto(IdString ident_r) const
void setAutoInstalled(const StringQueue &autoInstalled_r)
Set ident list of all autoinstalled solvables.
bool addRequestedLocale(const Locale &locale_r)
User change (tracked).
int _addSolv(CRepo *repo_r, FILE *file_r)
Adding solv file to a repo.
SolvableSet MultiversionList
int _addHelix(CRepo *repo_r, FILE *file_r)
Adding helix file to a repo.
sat::SolvableSpec _ptfPackageSpec
bool isRetracted(const Solvable &solv_r) const
bool validSolvable(const CSolvable &slv_r) const
a valid Solvable has a non NULL repo pointer.
detail::SolvableIdType _addSolvables(CRepo *repo_r, unsigned count_r)
Adding Solvables to a repo.
CSolvable * getSolvable(SolvableIdType id_r) const
Return pointer to the sat-solvable or NULL if it is not valid.
SerialNumber _serialIDs
Serial number of IDs - changes whenever resusePoolIDs==true - ResPool must also invalidate its PoolIt...
bool isMultiversion(const Solvable &solv_r) const
void prepare() const
Update housekeeping data (e.g.
void multiversionSpecChanged()
static const std::string & systemRepoAlias()
Reserved system repository alias @System .
SolvableIdType getNextId(SolvableIdType id_r) const
Get id of the next valid Solvable.
const SerialNumber & serial() const
Serial number changing whenever the content changes.
SolvableIdType getFirstId() const
Get id of the first valid Solvable.
bool isOnSystemByUser(IdString ident_r) const
void setRepoInfo(RepoIdType id_r, const RepoInfo &info_r)
Also adjust repo priority and subpriority accordingly.
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.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
::s_Repo CRepo
Wrapped libsolv C data type exposed as backdoor.
int IdType
Generic Id type.
::s_Solvable CSolvable
Wrapped libsolv C data type exposed as backdoor.
::s_Pool CPool
Wrapped libsolv C data type exposed as backdoor.
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
CRepo * RepoIdType
Id type to connect Repo and sat-repo.
Easy-to use interface to the ZYPP dependency resolver.
std::unordered_set< Locale > LocaleSet
Track added/removed set items based on an initial set.
const set_type & current() const
Return the current set.
const set_type & added() const
Return the set of added items.
const set_type & removed() const
Return the set of removed items.
bool contains(const key_type &key_r) const
Whether val_r is in the set.