12#ifndef ZYPP_SAT_REPOSITORY_H
13#define ZYPP_SAT_REPOSITORY_H
16#include <zypp/base/Iterator.h>
17#include <zypp/Pathname.h>
42 typedef filter_iterator<detail::ByRepository, sat::detail::SolvableIterator>
SolvableIterator;
54 :
_id( sat::detail::noRepoId ) {}
65 explicit operator bool()
const
66 {
return get() !=
nullptr; }
84 std::string
alias()
const;
87 std::string
name()
const;
90 std::string
label()
const;
160 bool hasKeyword(
const std::string & val_r )
const;
206 class ProductInfoIterator;
267 struct EraseFromPool;
341 {
return lhs.
get() == rhs.
get(); }
345 {
return lhs.
get() != rhs.
get(); }
349 {
return lhs.
get() < rhs.
get(); }
372 Repository::ProductInfoIterator
373 , sat::LookupAttr::iterator
375 , boost::forward_traversal_tag
384 std::string
label()
const;
455 , sat::detail::CRepo **
457 , boost::forward_traversal_tag
Common Platform Enumearation (2.3) See http://cpe.mitre.org/ for more information on the Common Platf...
Store and operate on date (time_t).
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.
friend class boost::iterator_core_access
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.
Repository()
Default ctor creates noRepository.
bool hasKeyword(const std::string &val_r) const
Whether val_r is present in keywords.
std::string ContentIdentifier
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 operator==(const Repository &lhs, const Repository &rhs)
sat::detail::RepoIdType IdType
bool solvablesEmpty() const
Whether Repository contains solvables.
std::string label() const
Alias or name, according to ZConfig::repoLabelIsAlias.
Date suggestedExpirationTimestamp() const
Suggested expiration timestamp.
SolvableIterator solvablesEnd() const
Iterator behind the last Solvable.
Repository(IdType id_r)
PoolImpl ctor.
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.
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.
Iterable< ProductInfoIterator > updatesProduct() const
Iterate distos the repository provides upadates for.
IdType id() const
Expert backdoor.
void setInfo(const RepoInfo &info_r)
Set RepoInfo for this repository.
sat::Solvable::IdType addSolvable()
std::string name() const
Label to display for this repo.
bool operator<(const Repository &lhs, const Repository &rhs)
bool operator!=(const Repository &lhs, const Repository &rhs)
void addSolv(const Pathname &file_r)
Load Solvables from a solv-file.
ContentRevision contentRevision() const
Timestamp or arbitrary user supplied string.
sat::detail::size_type size_type
filter_iterator< detail::ByRepository, sat::detail::SolvableIterator > SolvableIterator
Iterable< ProductInfoIterator > compatibleWithProduct() const
Iterate the repository compatible distros.
Iterable< SolvableIterator > solvables() const
Iterate the repositories Solvables.
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 ContentRevision
std::string asUserString() const
User string: label (alias or name)
sat::ArrayAttr< std::string, std::string > Keywords
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.
Repository dereference() const
RepositoryIterator(sat::detail::CRepo **p)
friend class boost::iterator_core_access
LookupAttr::TransformIterator based container to retrieve list attributes.
A Solvable object within the sat Pool.
sat::detail::SolvableIdType IdType
Repository repository() const
The Repository this Solvable belongs to.
String related utilities and Regular expression matching.
::s_Repo CRepo
Wrapped libsolv C data type exposed as backdoor.
CRepo * RepoIdType
Id type to connect Repo and sat-repo.
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)
Functor removing Repository from its Pool.
void operator()(Repository repository_r) const
Functor filtering Solvable by Repository.
ByRepository(sat::detail::RepoIdType id_r)
ByRepository(const Repository &repository_r)
bool operator()(const sat::Solvable &slv_r) const
Backlink to the associated PoolImpl.