43 #define NO_REPOSITORY_RETURN( VAL ) \
44 ::_Repo * _repo( get() ); \
45 if ( ! _repo ) return VAL
47 #define NO_REPOSITORY_THROW( VAL ) \
48 ::_Repo * _repo( get() ); \
49 if ( ! _repo ) ZYPP_THROW( VAL )
71 return _repo->priority;
77 return _repo->subpriority;
134 if ( key == it.cpeId() )
150 return !_repo->nsolvables;
156 return _repo->nsolvables;
213 info_r.
alias().c_str(),
alias().c_str() ) ) );
216 MIL << *
this << endl;
228 MIL << *
this <<
" removed from pool" << endl;
240 if ( ++it != _for_end )
259 if (
myPool()._addSolv( _repo, file ) != 0 )
264 MIL << *
this <<
" after adding " << file_r << endl;
271 std::string command( file_r.extension() ==
".gz" ?
"zcat " :
"cat " );
272 command += file_r.asString();
281 if (
myPool()._addHelix( _repo, file ) != 0 )
286 MIL << *
this <<
" after adding " << file_r << endl;
303 return str <<
"noRepository";
305 return str <<
"sat::repo(" << obj.
alias() <<
")"
307 <<
"prio " << obj.
get()->priority <<
'.' << obj.
get()->subpriority
315 {
"name", obj.
name() },
316 {
"alias", obj.
alias() }
330 }
while ( base() < satpool->repos+satpool->nrepos && !*base() );
::_Pool * get() const
Expert backdoor.
std::string name() const
Repository short label.
#define NO_REPOSITORY_RETURN(VAL)
RepoInfo info() const
Return any associated RepoInfo.
std::ostream & node(std::ostream &out_r, const std::string &name_r, Node::Attr attr_r)
Functor filtering Solvable by Repository.
bool isSystemRepo(::_Repo *repo_r) const
std::string alias() const
unique identifier for this source.
static const SolvAttr repositoryExpire
static const SolvAttr repositoryProductLabel
sat::ArrayAttr< std::string, std::string > Keywords
std::string alias() const
Short unique string to identify a repo.
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
std::string name() const
Label to display for this repo.
void addSolv(const Pathname &file_r)
Load Solvables from a solv-file.
void resetDispose()
Set no dispose function.
std::string label() const
Product label.
std::ostream & dumpAsXmlOn(std::ostream &str, const CheckSum &obj)
sat::Solvable::IdType addSolvables(unsigned count_r)
Add count_r new empty Solvable to this Repository.
static const RepoIdType noRepoId(0)
Id to denote Repo::noRepository.
void clearInfo()
Remove any RepoInfo set for this repository.
static const SolvAttr repositoryTimestamp
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
SolvableIterator solvablesEnd() const
Iterator behind the last Solvable.
What is known about a repository.
Date generatedTimestamp() const
Timestamp when this repository was generated.
unsigned asUnsigned() const
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
LookupAttr::transformIterator based container to retrieve list attributes.
int satInternalSubPriority() const
bool isSystemRepo() const
Return whether this is the system repository.
bool providesUpdatesFor(const std::string &cpeid) const
whether the repository claims to update something prod with key cpeid
void _deleteRepo(::_Repo *repo_r)
Creating a new repo named name_r.
filter_iterator< detail::ByRepository, sat::detail::SolvableIterator > SolvableIterator
bool isUpdateRepo() const
if the repository claims to update something then it is an update repository
sat::detail::size_type size_type
Repository nextInPool() const
Return next Repository in Pool (or noRepository).
detail::SolvableIdType _addSolvables(::_Repo *repo_r, unsigned count_r)
Adding Solvables to a repo.
Store and operate on date (time_t).
static Pool instance()
Singleton ctor.
SolvableIterator solvablesBegin() const
Iterator to the first Solvable.
void setRepoInfo(RepoIdType id_r, const RepoInfo &info_r)
Also adjust repo priority and subpriority accordingly.
Lightweight repository attribute value lookup.
std::ostream & operator<<(std::ostream &str, const Exception &obj)
void setInfo(const RepoInfo &info_r)
Set RepoInfo for this repository.
Date suggestedExpirationTimestamp() const
Suggested expiration timestamp.
Query class for Repository related products.
Keywords keywords() const
repository keywords (tags)
static PoolImpl & myPool()
::_Repo * get() const
Expert backdoor.
bool solvablesEmpty() const
Whether Repository contains solvables.
#define NO_REPOSITORY_THROW(VAL)
std::string cpeId() const
The Common Platform Enumeration name for this product.
bool empty() const
Whether the query is empty.
size_type solvablesSize() const
Number of solvables in Repository.
::_Repo * getRepo(RepoIdType id_r) const
std::string form(const char *format,...)
Printf style construction of std::string.
void addHelix(const Pathname &file_r)
Load Solvables from a helix-file.
Base class for Exception.
static const Repository noRepository
Represents no Repository.
int satInternalPriority() const
libsolv internal priorities.
static Date now()
Return the current time.
static const std::string & systemRepoAlias()
Reserved system repository alias .
Reference counted access to a _Tp object calling a custom Dispose function when the last AutoDispose ...
static const SolvAttr repositoryKeywords
void eraseFromPool()
Remove this Repository from it's Pool.
static const SolvAttr repositoryProductCpeid
ProductInfoIterator updatesProductEnd() const
Get an iterator to the end of the repository compatible distros.
static const std::string & systemRepoAlias()
Reserved system repository alias .
static const SolvAttr repositoryDistros
array of repositoryProductLabel repositoryProductCpeid pairs
static const SolvAttr repositoryUpdates
array of repositoryProductLabel repositoryProductCpeid pairs
const RepoInfo & repoInfo(RepoIdType id_r)
ProductInfoIterator compatibleWithProductEnd() const
Get an iterator to the end of the repository compatible distros.
ProductInfoIterator updatesProductBegin() const
Get an iterator to the beginning of the repository compatible distros.
bool maybeOutdated() const
The suggested expiration date of this repository already passed.
ProductInfoIterator compatibleWithProductBegin() const
Get an iterator to the beginning of the repository compatible distros.
iterator begin() const
Iterator to the begin of query results.
Search for repository attributes.