14#ifndef ZYPPNG_SAT_POOL_H_INCLUDED
15#define ZYPPNG_SAT_POOL_H_INCLUDED
133 {
return repo_r &&
_pool->installed == repo_r; }
137 {
return _pool->installed; }
157 const char * rd = ::pool_get_rootdir(
_pool );
158 return( rd ? rd :
"/" );
164 if ( root_r.
empty() || root_r ==
"/" )
165 ::pool_set_rootdir(
_pool,
nullptr );
209 {
return slv_r.repo; }
230 return &
_pool->solvables[id_r];
237 { return ::pool_parserpmrichdep(
_pool, capstr_r ); }
252 for( ++id_r; id_r < unsigned(
_pool->nsolvables); ++id_r )
265 template <
typename T>
268 template <
typename T>
Simple serial number watcher.
Simple serial number provider.
const char * c_str() const
String representation.
bool empty() const
Test for an empty path.
Registry and dispatcher for all pool components.
const SerialNumber & serialIDs() const
Serial number changing whenever resusePoolIDs==true was used.
void _postRepoAdd(detail::CRepo *repo_r)
Helper postprocessing the repo after adding solv or helix files.
bool _preparing
True while prepare() is running — setDirty() is illegal in this window.
detail::CRepo * _createRepo(const std::string &name_r)
Creating a new repo named name_r.
void reposErase(const std::string &alias_r)
Remove a Repository named alias_r.
SolvableIterable solvables() const
Iterator to the first Solvable.
const PoolComponentSet & components() const
void _deleteRepo(detail::CRepo *repo_r)
Delete repo repo_r from pool.
detail::CPool * get() const
Expert backdoor.
bool validSolvable(const detail::CSolvable &slv_r) const
a valid Solvable has a non NULL repo pointer.
SerialNumber _serialIDs
Serial number of IDs - changes whenever resusePoolIDs==true - ResPool must also invalidate its PoolIt...
zypp::Iterable< detail::RepositoryIterator > RepositoryIterable
detail::CRepo * _systemRepoPtr() const
Repository systemRepo()
Return the system repository, create it if missing.
bool validSolvable(const detail::CSolvable *slv_r) const
int _addTesttags(detail::CRepo *repo_r, FILE *file_r)
Adding testtags file to a repo.
zypp::Iterable< detail::SolvableIterator > SolvableIterable
const SerialNumber & serial() const
Serial number changing whenever the content changes.
SerialNumberWatcher _watcher
Watch serial number.
void clear()
Reset the pool by removing all repositories and solvables.
detail::size_type solvablesSize() const
Number of solvables in Pool.
int _addHelix(detail::CRepo *repo_r, FILE *file_r)
Adding helix file to a repo.
void rootDir(const zypp::Pathname &root_r)
Set rootdir (for file conflicts check).
PoolComponentSet _componentsSet
Component set managing modular pool logic.
detail::SolvableIdType getFirstId() const
Get id of the first valid Solvable.
detail::CRepo * getRepo(detail::RepoIdType id_r) const
detail::CSolvable * getSolvable(detail::SolvableIdType id_r) const
Return pointer to the sat-solvable or NULL if it is not valid.
Repository reposFind(const std::string &alias_r) const
Find a Repository named alias_r.
bool solvablesEmpty() const
Whether Pool contains solvables.
int _addSolv(detail::CRepo *repo_r, FILE *file_r)
Adding solv file to a repo.
bool validSolvable(detail::SolvableIdType id_r) const
void setDirty(PoolInvalidation invalidation, std::initializer_list< std::string_view > reasons)
Invalidate everything.
void reposEraseAll()
Remove all repos from the pool.
detail::CPool * getPool() const
detail::CPool * _pool
sat-pool.
Repository findSystemRepo() const
Return the system repository if it is on the pool.
PoolComponentSet & components()
Get rootdir (for file conflicts check).
bool reposEmpty() const
Whether Pool contains repos.
Pool & operator=(const Pool &)=delete
detail::size_type reposSize() const
Number of repos in Pool.
PreparedPool prepare()
Update housekeeping data (e.g.
detail::SolvableIdType getNextId(detail::SolvableIdType id_r) const
Get id of the next valid Solvable.
Repository reposInsert(const std::string &alias_r)
Return a Repository named alias_r.
SerialNumber _serial
Serial number - changes with each Pool content change.
Pool & operator=(Pool &&)=delete
bool isSystemRepo(detail::CRepo *repo_r) const
Pool(const Pool &)=delete
zypp::Pathname rootDir() const
RepositoryIterable repos() const
Iteratable to the repositories.
static const std::string & systemRepoAlias()
Reserved system repository alias @System .
detail::size_type capacity() const
const T * findComponent() const
detail::IdType parserpmrichdep(const char *capstr_r)
libsolv capability parser
detail::SolvableIdType _addSolvables(detail::CRepo *repo_r, unsigned count_r)
Adding Solvables to a repo.
A move-only, non-owning view of a Pool that guarantees the whatprovides index is valid.
void eraseFromPool()
Query class for Repository related products.
zypp::sat::detail::CSolvable CSolvable
zypp::sat::detail::RepoIdType RepoIdType
zypp::sat::detail::CPool CPool
zypp::sat::detail::SolvableIdType SolvableIdType
static const SolvableIdType noSolvableId(0)
Id to denote Solvable::noSolvable.
zypp::sat::detail::IdType IdType
zypp::sat::detail::CRepo CRepo
This file contains private API, this might break at any time between releases.
PoolInvalidation
Defines the scope of an invalidation request for the Pool.