46#define NO_REPOSITORY_RETURN( VAL ) \
47 sat::detail::CRepo * _repo( get() ); \
48 if ( ! _repo ) return VAL
50#define NO_REPOSITORY_THROW( VAL ) \
51 sat::detail::CRepo * _repo( get() ); \
52 if ( ! _repo ) ZYPP_THROW( VAL )
57 return myPool().isSystemRepo( _repo );
77 return _repo->priority;
83 return _repo->subpriority;
90 return q.empty() ? std::string() :
q.begin().asString();
97 return q.empty() ? std::string() :
q.begin().asString();
105 if (
it.asString() ==
id_r )
114 return(
q.empty() ? 0 :
q.begin().asUnsigned() );
139 for (
const auto & val :
keywords() )
170 if ( compare(
cpeid_r,
it.cpeId(), SetRelation::subset ) )
176 if ( !
myIds.empty() )
182 if ( compare(
cpeid_r,
prod->cpeId(), SetRelation::superset ) )
186 if (
prod->hasUpdateContentIdentifier(
myId.asString() ) )
205 if ( !
myIds.empty() )
223 return !_repo->nsolvables;
229 return _repo->nsolvables;
277 return myPool().repoInfo( _repo );
289 MIL << *
this << endl;
301 MIL << *
this <<
" removed from pool" << endl;
302 myPool()._deleteRepo( _repo );
332 if (
myPool()._addSolv( _repo, file ) != 0 )
337 MIL << *
this <<
" after adding " <<
file_r << endl;
344 std::string command(
file_r.extension() ==
".gz" ?
"zcat " :
"cat " );
345 command +=
file_r.asString();
354 if (
myPool()._addHelix( _repo, file ) != 0 )
359 MIL << *
this <<
" after adding " <<
file_r << endl;
366 std::string command(
file_r.extension() ==
".gz" ?
"zcat " :
"cat " );
367 command +=
file_r.asString();
376 if (
myPool()._addTesttags( _repo, file ) != 0 )
381 MIL << *
this <<
" after adding " <<
file_r << endl;
398 return str <<
"noRepository";
400 return str <<
"sat::repo(" <<
obj.alias() <<
")"
402 <<
"prio " <<
obj.get()->priority <<
'.' <<
obj.get()->subpriority
403 <<
", size " <<
obj.solvablesSize()
410 {
"name",
obj.name() },
411 {
"alias",
obj.alias() }
418 void RepositoryIterator::increment()
425 }
while ( base() < satpool->repos+satpool->nrepos && !*base() );
#define NO_REPOSITORY_THROW(VAL)
#define NO_REPOSITORY_RETURN(VAL)
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
void resetDispose()
Set no dispose function.
Common Platform Enumearation (2.3) See http://cpe.mitre.org/ for more information on the Common Platf...
static constexpr NoThrowType noThrow
Indicator argument for non-trowing ctor.
Store and operate on date (time_t).
static Date now()
Return the current time.
Base class for Exception.
bool hasUpdateContentIdentifier(const Repository::ContentIdentifier &cident_r) const
Whether cident_r is listed as required update repository.
TraitsType::constPtrType constPtr
What is known about a repository.
Query class for Repository related products.
std::string label() const
Product label.
CpeId cpeId() const
The Common Platform Enumeration name for this product.
Repository nextInPool() const
Return next Repository in Pool (or noRepository).
int satInternalSubPriority() const
static const Repository noRepository
Represents no Repository.
void addHelix(const Pathname &file_r)
Load Solvables from a helix-file.
bool hasKeyword(const std::string &val_r) const
Whether val_r is present in keywords.
bool isUpdateRepo() const
Hint whether the Repo may provide updates for a product.
Keywords keywords() const
repository keywords (tags)
sat::detail::CRepo * get() const
Expert backdoor.
bool solvablesEmpty() const
Whether Repository contains solvables.
std::string label() const
Alias or name, according to ZConfig::repoLabelIsAlias.
Date suggestedExpirationTimestamp() const
Suggested expiration timestamp.
filter_iterator< detail::ByRepository, sat::detail::SolvableIterator > SolvableIterator
SolvableIterator solvablesEnd() const
Iterator behind the last Solvable.
ProductInfoIterator compatibleWithProductEnd() const
Get an iterator to the end of the repository compatible distros.
int satInternalPriority() const
libsolv internal priorities.
void clearInfo()
Remove any RepoInfo set for this repository.
sat::Solvable::IdType addSolvables(unsigned count_r)
Add count_r new empty Solvable to this Repository.
bool providesUpdatesFor(const CpeId &cpeid_r) const
Hint whether the Repo may provide updates for a product identified by its CpeId.
SolvableIterator solvablesBegin() const
Iterator to the first Solvable.
std::string ContentRevision
void addTesttags(const Pathname &file_r)
Load Solvables from a libsolv testtags-file.
ProductInfoIterator updatesProductEnd() const
Get an iterator to the end of distos the repository provides upadates for.
ContentIdentifier contentIdentifier() const
Unique string identifying a repositories content.
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.
std::string alias() const
Short unique string to identify a repo.
bool hasContentIdentifier(const ContentIdentifier &id_r) const
Whether id_r matches this repos content identifier.
size_type solvablesSize() const
Number of solvables in Repository.
void setInfo(const RepoInfo &info_r)
Set RepoInfo for this repository.
std::string name() const
Label to display for this repo.
void addSolv(const Pathname &file_r)
Load Solvables from a solv-file.
ContentRevision contentRevision() const
Timestamp or arbitrary user supplied string.
sat::ArrayAttr< std::string, std::string > Keywords
Date generatedTimestamp() const
Timestamp when this repository was generated.
ProductInfoIterator updatesProductBegin() const
Get an iterator to the beginning of distos the repository provides upadates for.
std::string ContentIdentifier
static const std::string & systemRepoAlias()
Reserved system repository alias @System .
RepoInfo info() const
Return any associated RepoInfo.
void eraseFromPool()
Remove this Repository from its Pool.
bool isSystemRepo() const
Return whether this is the system repository.
static ResPool instance()
Singleton ctor.
byKind_iterator byKindEnd(const ResKind &kind_r) const
byKind_iterator byKindBegin(const ResKind &kind_r) const
std::string label() const
Label for use in messages for the user interface.
std::string name() const
Repository name.
LookupAttr::TransformIterator based container to retrieve list attributes.
@ REPO_ATTR
Search for repository attributes.
iterator begin() const
Iterator to the begin of query results.
Lightweight repository attribute value lookup.
static Pool instance()
Singleton ctor.
static const SolvAttr repositoryUpdates
array of repositoryProductLabel repositoryProductCpeid pairs
static const SolvAttr repositoryRepoid
static const SolvAttr repositoryRevision
static const SolvAttr repositoryProductLabel
static const SolvAttr repositoryTimestamp
static const SolvAttr repositoryExpire
static const SolvAttr repositoryProductCpeid
static const SolvAttr repositoryDistros
array of repositoryProductLabel repositoryProductCpeid pairs
static const SolvAttr repositoryKeywords
static const std::string & systemRepoAlias()
Reserved system repository alias @System .
Iterate over valid Solvables in the pool.
String related utilities and Regular expression matching.
static const RepoIdType noRepoId(0)
Id to denote Repo::noRepository.
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
std::ostream & node(std::ostream &out_r, const std::string &name_r, Node::Attr attr_r)
Easy-to use interface to the ZYPP dependency resolver.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
std::ostream & dumpAsXmlOn(std::ostream &str, const Repository &obj)
std::string asString(const Patch::Category &obj)
Functor filtering Solvable by Repository.
static PoolImpl & myPool()
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.