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