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 ) 83 return _repo->subpriority;
105 if ( it.asString() == id_r )
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;
286 info_r.
alias().c_str(),
alias().c_str() ) ) );
289 MIL << *
this << endl;
301 MIL << *
this <<
" removed from pool" << endl;
313 if ( ++it != _for_end )
337 MIL << *
this <<
" after adding " << file_r << endl;
344 std::string command( file_r.
extension() ==
".gz" ?
"zcat " :
"cat " );
359 MIL << *
this <<
" after adding " << file_r << endl;
366 std::string command( file_r.
extension() ==
".gz" ?
"zcat " :
"cat " );
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
410 {
"name", obj.
name() },
411 {
"alias", obj.
alias() }
425 }
while ( base() < satpool->repos+satpool->nrepos && !*base() );
std::string asString(const Patch::Category &obj)
#define NO_REPOSITORY_RETURN(VAL)
int satInternalSubPriority() const
std::ostream & node(std::ostream &out_r, const std::string &name_r, Node::Attr attr_r)
unsigned priority() const
Repository priority for solver.
ContentIdentifier contentIdentifier() const
Unique string identifying a repositories content.
Functor filtering Solvable by Repository.
bool isUpdateRepo() const
Hint whether the Repo may provide updates for a product.
Date suggestedExpirationTimestamp() const
Suggested expiration timestamp.
static const SolvAttr repositoryExpire
static const SolvAttr repositoryProductLabel
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
bool isSystemRepo() const
Return whether this is the system repository.
void addSolv(const Pathname &file_r)
Load Solvables from a solv-file.
bool providesUpdatesFor(const CpeId &cpeid_r) const
Hint whether the Repo may provide updates for a product identified by its CpeId.
ProductInfoIterator compatibleWithProductBegin() const
Get an iterator to the beginning of the repository compatible distros.
::s_Repo CRepo
Wrapped libsolv C data type exposed as backdoor.
void _deleteRepo(CRepo *repo_r)
Delete repo repo_r from pool.
sat::Solvable::IdType addSolvables(unsigned count_r)
Add count_r new empty Solvable to this Repository.
std::string name() const
Label to display for this repo.
static const RepoIdType noRepoId(0)
Id to denote Repo::noRepository.
std::string ContentRevision
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
byKind_iterator byKindBegin(const ResKind &kind_r) const
void clearInfo()
Remove any RepoInfo set for this repository.
const char * c_str() const
String representation.
static const SolvAttr repositoryTimestamp
ProductInfoIterator compatibleWithProductEnd() const
Get an iterator to the end of the repository compatible distros.
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
What is known about a repository.
Common Platform Enumearation (2.3) See http://cpe.mitre.org/ for more information on the Common Platf...
detail::SolvableIdType _addSolvables(CRepo *repo_r, unsigned count_r)
Adding Solvables to a repo.
LookupAttr::TransformIterator based container to retrieve list attributes.
bool maybeOutdated() const
The suggested expiration date of this repository already passed.
std::string label() const
Product label.
filter_iterator< detail::ByRepository, sat::detail::SolvableIterator > SolvableIterator
Iterate over valid Solvables in the pool.
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
CRepo * getRepo(RepoIdType id_r) const
sat::detail::size_type size_type
void addTesttags(const Pathname &file_r)
Load Solvables from a libsolv testtags-file.
TraitsType::constPtrType constPtr
static const SolvAttr repositoryRevision
bool isSystemRepo(CRepo *repo_r) const
CpeId cpeId() const
The Common Platform Enumeration name for this product.
iterator end() const
Iterator behind the end of query results.
Store and operate on date (time_t).
SolvableIterator solvablesEnd() const
Iterator behind the last Solvable.
std::ostream & dumpAsXmlOn(std::ostream &str, const Repository &obj)
static Pool instance()
Singleton ctor.
sat::detail::CRepo * get() const
Expert backdoor.
void setRepoInfo(RepoIdType id_r, const RepoInfo &info_r)
Also adjust repo priority and subpriority accordingly.
Lightweight repository attribute value lookup.
const std::string & asString() const
String representation.
static constexpr NoThrowType noThrow
Indicator argument for non-trowing ctor.
std::string alias() const
unique identifier for this source.
void setInfo(const RepoInfo &info_r)
Set RepoInfo for this repository.
RepoInfo info() const
Return any associated RepoInfo.
SolvableIterator solvablesBegin() const
Iterator to the first Solvable.
Keywords keywords() const
repository keywords (tags)
bool hasKeyword(const std::string &val_r) const
Whether val_r is present in keywords.
detail::CPool * get() const
Expert backdoor.
Query class for Repository related products.
std::string ContentIdentifier
Date generatedTimestamp() const
Timestamp when this repository was generated.
unsigned asUnsigned() const
int satInternalPriority() const
libsolv internal priorities.
static PoolImpl & myPool()
ProductInfoIterator updatesProductBegin() const
Get an iterator to the beginning of distos the repository provides upadates for.
#define NO_REPOSITORY_THROW(VAL)
bool hasContentIdentifier(const ContentIdentifier &id_r) const
Whether id_r matches this repos content identifier.
sat::ArrayAttr< std::string, std::string > Keywords
void resetDispose()
Set no dispose function.
byKind_iterator byKindEnd(const ResKind &kind_r) const
Repository nextInPool() const
Return next Repository in Pool (or noRepository).
void addHelix(const Pathname &file_r)
Load Solvables from a helix-file.
std::string alias() const
Short unique string to identify a repo.
ContentRevision contentRevision() const
Timestamp or arbitrary user supplied string.
Base class for Exception.
static const Repository noRepository
Represents no Repository.
ProductInfoIterator updatesProductEnd() const
Get an iterator to the end of distos the repository provides upadates for.
static Date now()
Return the current time.
static const SolvAttr repositoryRepoid
std::string name() const
Repository name.
::s_Pool CPool
Wrapped libsolv C data type exposed as backdoor.
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 h...
static const SolvAttr repositoryKeywords
void eraseFromPool()
Remove this Repository from its Pool.
static const SolvAttr repositoryProductCpeid
bool solvablesEmpty() const
Whether Repository contains solvables.
unsigned int SolvableIdType
Id type to connect Solvable and sat-solvable.
static const std::string & systemRepoAlias()
Reserved system repository alias .
bool hasUpdateContentIdentifier(const Repository::ContentIdentifier &cident_r) const
Whether cident_r is listed as required update repository.
static const SolvAttr repositoryDistros
array of repositoryProductLabel repositoryProductCpeid pairs
static const SolvAttr repositoryUpdates
array of repositoryProductLabel repositoryProductCpeid pairs
std::string asString() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
const RepoInfo & repoInfo(RepoIdType id_r)
size_type solvablesSize() const
Number of solvables in Repository.
Easy-to use interface to the ZYPP dependency resolver.
std::string label() const
Label for use in messages for the user interface.
bool empty() const
Whether the query is empty.
iterator begin() const
Iterator to the begin of query results.
std::string label() const
Alias or name, according to ZConfig::repoLabelIsAlias.
Search for repository attributes.
static ResPool instance()
Singleton ctor.
std::string extension() const
Return all of the characters in name after and including the last dot in the last element of name...