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>
80 void setDirty(
const char * a1 = 0,
const char * a2 = 0,
const char * a3 = 0 );
84 void localeSetDirty(
const char * a1 = 0,
const char * a2 = 0,
const char * a3 = 0 );
88 void depSetDirty(
const char * a1 = 0,
const char * a2 = 0,
const char * a3 = 0 );
98 {
return repo_r &&
_pool->installed == repo_r; }
101 {
return _pool->installed; }
106 const char * rd = ::pool_get_rootdir(
_pool );
107 return( rd ? rd :
"/" );
113 if ( root_r.empty() || root_r ==
"/" )
114 ::pool_set_rootdir(
_pool,
nullptr );
116 ::pool_set_rootdir(
_pool, root_r.c_str() );
153 {
return slv_r.repo; }
175 return &
_pool->solvables[id_r];
193 for( ++id_r; id_r < unsigned(
_pool->nsolvables); ++id_r )
216 {
return _pool->whatprovidesdata[offset_r]; }
269 LocaleSet::const_iterator it( avl.find( locale_r ) );
270 return it != avl.end();
347 #define POOL_SETDIRTY
348 #endif // ZYPP_SAT_DETAIL_POOLIMPL_H
static const SolvableIdType noSolvableId(0)
Id to denote Solvable::noSolvable.
Simple serial number watcher.
SolvableSet MultiversionList
int IdType
Generic Id type.
Pathname rootDir() const
Get rootdir (for file conflicts check)
A Solvable object within the sat Pool.
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.
int _addSolv(CRepo *repo_r, FILE *file_r)
Adding solv file to a repo.
base::SetTracker< LocaleSet > _requestedLocalesTracker
const set_type & removed() const
Return the set of removed items.
IdType id() const
Expert backdoor.
::_Repo CRepo
Wrapped libsolv C data type exposed as backdoor.
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.
void prepareForSolving() const
prepare plus some expensive checks done before solving only.
void _deleteRepo(CRepo *repo_r)
Creating a new repo named name_r.
::_Pool CPool
Wrapped libsolv C data type exposed as backdoor.
void rootDir(const Pathname &root_r)
Set rootdir (for file conflicts check)
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
bool validSolvable(const CSolvable &slv_r) const
a valid Solvable has a non NULL repo pointer.
void eraseRepoInfo(RepoIdType id_r)
const set_type & current() const
Return the current set.
What is known about a repository.
CRepo * RepoIdType
Id type to connect Repo and sat-repo.
const std::set< std::string > & requiredFilesystems() const
accessor for etc/sysconfig/storage reading file on demand
bool isAvailableLocale(const Locale &locale_r) const
Access to the sat-pools string space.
bool validSolvable(SolvableIdType id_r) const
detail::SolvableIdType _addSolvables(CRepo *repo_r, unsigned count_r)
Adding Solvables to a repo.
const LocaleSet & getAddedRequestedLocales() const
Added since last initRequestedLocales.
void localeSetDirty(const char *a1=0, const char *a2=0, const char *a3=0)
Invalidate locale related housekeeping data.
::_Solvable CSolvable
Wrapped libsolv C data type exposed as backdoor.
CSolvable * getSolvable(SolvableIdType id_r) const
Return pointer to the sat-solvable or NULL if it is not valid.
const MultiversionList & multiversionList() const
const LocaleSet & getRequestedLocales() const
Current set of requested Locales.
const TrackedLocaleIds & trackedLocaleIds() const
Expanded _requestedLocalesTracker for solver.
const SerialNumber & serial() const
Serial number changing whenever the content changes.
void multiversionListInit() const
CRepo * getRepo(RepoIdType id_r) const
const LocaleSet & getAvailableLocales() const
All Locales occurring in any repo.
SolvableIdType getNextId(SolvableIdType id_r) const
Get id of the next valid Solvable.
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 LocaleSet & getRemovedRequestedLocales() const
Removed since last initRequestedLocales.
void setRepoInfo(RepoIdType id_r, const RepoInfo &info_r)
Also adjust repo priority and subpriority accordingly.
SerialNumberWatcher _watcher
Watch serial number.
void setRequestedLocales(const LocaleSet &locales_r)
User change (tracked).
bool isOnSystemByUser(IdString ident_r) const
sat::StringQueue _autoinstalled
bool contains(const key_type &key_r) const
Whether val_r is in the set.
base::SetTracker< IdStringSet > TrackedLocaleIds
StringQueue autoInstalled() const
Get ident list of all autoinstalled solvables.
CRepo * systemRepo() const
Simple serial number provider.
'Language[_Country]' codes.
void _postRepoAdd(CRepo *repo_r)
Helper postprocessing the repo after adding solv or helix files.
SerialNumber _serial
Serial number.
const set_type & added() const
Return the set of added items.
scoped_ptr< MultiversionList > _multiversionListPtr
Libsolv Id queue wrapper.
void depSetDirty(const char *a1=0, const char *a2=0, const char *a3=0)
Invalidate housekeeping data (e.g.
SolvableIdType getFirstId() const
Get id of the first valid Solvable.
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.
bool validSolvable(const CSolvable *slv_r) const
void prepare() const
Update housekeeping data (e.g.
bool isSystemRepo(CRepo *repo_r) const
void initRequestedLocales(const LocaleSet &locales_r)
Start tracking changes based on this locales_r.
static const std::string & systemRepoAlias()
Reserved system repository alias .
CPool * operator->()
Pointer style access forwarded to sat-pool.
scoped_ptr< TrackedLocaleIds > _trackedLocaleIdsPtr
bool isRequestedLocale(const Locale &locale_r) const
const RepoInfo & repoInfo(RepoIdType id_r)
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
void setAutoInstalled(const StringQueue &autoInstalled_r)
Set ident list of all autoinstalled solvables.
void multiversionSpecChanged()
bool isMultiversion(const Solvable &solv_r) const
sat::detail::IdType id() const
Expert backdoor.
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 additioanal convenience iterators.