12#ifndef ZYPP2_REPOSITORYINFO_H
13#define ZYPP2_REPOSITORYINFO_H
18#include <zypp/base/Iterator.h>
23#include <zypp/TriBool.h>
457 template <
class TIterator>
461 template <
class TContainer>
472 template <
class TIterator>
476 template <
class TContainer>
480 template <
class TIterator>
484 template <
class TContainer>
540 std::ostream &
dumpOn( std::ostream &
str )
const override;
556 std::ostream &
dumpAsXmlOn( std::ostream &
str,
const std::string & content =
"" )
const override;
Provides API related macros.
RepoManager implementation.
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
'Language[_Country]' codes.
What is known about a repository.
void setPkgGpgCheck(TriBool value_r)
Set the value for pkgGpgCheck (or indeterminate to use the default).
std::ostream & dumpAsXmlOn(std::ostream &str, const std::string &content="") const override
Write an XML representation of this RepoInfo object.
void setGpgKeyUrls(url_set urls)
Set a list of gpgkey URLs defined for this repo.
void setMirrorListUrls(url_set urls)
Like setMirrorListUrl but take an url_set.
void setMetalinkUrl(const Url &url)
Like setMirrorListUrl but expect metalink format.
std::ostream & dumpOn(std::ostream &str) const override
Write a human-readable representation of this RepoInfo object into the str stream.
Pathname metadataPath() const
Path where this repo metadata was read from.
bool hasContentAny(const TContainer &container_r) const
RepoInfo(RepoInfo &&)=default
url_set::size_type urls_size_type
void setGpgKeyUrl(const Url &gpgkey)
(leagcy API) Set the gpgkey URL defined for this repo
bool usesAutoMetadataPaths() const
Whether metadataPath uses AUTO% setup.
void addContentFrom(TIterator begin_r, TIterator end_r)
GpgCheck
Some predefined settings.
bool baseUrlsEmpty() const
whether repository urls are available
bool hasContent() const
Check for content keywords.
void setKeepPackages(bool keep)
Set if packaqes downloaded from this repository will be kept in local cache.
url_set gpgKeyUrls() const
The list of gpgkey URLs defined for this repo.
Url rawGpgKeyUrl() const
(leagcy API) The 1st raw gpgkey URL defined for this repo (no variables replaced)
transform_iterator< repo::RepoVariablesUrlReplacer, url_set::const_iterator > urls_const_iterator
void setMirrorListUrl(const Url &url)
Set mirror list url.
Url rawUrl() const
Pars pro toto: The first repository raw url (no variables replaced)
Pathname provideKey(const std::string &keyID_r, const Pathname &targetDirectory_r) const
downloads all configured gpg keys into the defined directory
repo::RepoType type() const
Type of repository,.
std::list< RepoInfo > RepoInfoList
url_set rawGpgKeyUrls() const
The list of raw gpgkey URLs defined for this repo (no variables replaced)
RepoInfo & operator=(const RepoInfo &)=default
static unsigned noPriority()
The least priority (unsigned(-1)).
urls_size_type baseUrlsSize() const
number of repository urls
bool keepPackages() const
Whether packages downloaded from this repository will be kept in local cache.
Url url() const
Pars pro toto: The first repository url.
static const RepoInfo noRepo
Represents no Repository (one with an empty alias).
void setBaseUrl(Url url)
Clears current base URL list and adds url.
const std::set< std::string > & contentKeywords() const
Content keywords defined.
urls_const_iterator baseUrlsEnd() const
iterator that points at end of repository urls
void setPackagesPath(const Pathname &path)
set the path where the local packages are stored
std::string getLicense(const Locale &lang_r=Locale()) const
Return the best license for the current (or a specified) locale.
bool baseUrlSet() const
Whether there are manualy configured repository urls.
void setService(const std::string &name)
sets service which added this repository
void setGpgCheck(TriBool value_r)
Set the value for gpgCheck (or indeterminate to use the default).
Pathname path() const
Repository path.
urls_size_type gpgKeyUrlsSize() const
Number of gpgkey URLs defined.
LocaleSet getLicenseLocales() const
Return the locales the license is available for.
url_set baseUrls() const
The complete set of repository urls.
bool requireStatusWithMediaFile() const
Returns true if this repository requires the media.1/media file to be included in the metadata status...
void addBaseUrl(Url url)
Add a base url.
bool pkgGpgCheckIsMandatory() const
Mandatory check (pkgGpgCheck is not off) must ask to confirm using unsigned packages.
url_set rawBaseUrls() const
The complete set of raw repository urls (no variables replaced)
bool hasContentAny(TIterator begin_r, TIterator end_r) const
Url mirrorListUrl() const
Url of a file which contains a list of repository urls.
void setProbedType(const repo::RepoType &t) const
This allows to adjust the RepoType lazy, from NONE to some probed value, even for const objects.
void setBaseUrls(url_set urls)
Clears current base URL list and adds an url_set.
std::string service() const
Gets name of the service to which this repository belongs or empty string if it has been added manual...
void setTargetDistribution(const std::string &targetDistribution)
Sets the distribution for which is this repository meant.
std::ostream & dumpAsIniOn(std::ostream &str) const override
Write this RepoInfo object into str in a .repo file format.
unsigned priority() const
Repository priority for solver.
bool gpgCheck() const
Whether default signature checking should be performed.
void setPath(const Pathname &path)
set the product path.
Url gpgKeyUrl() const
(leagcy API) The 1st gpgkey URL defined for this repo
void setValidRepoSignature(TriBool value_r)
Set the value for validRepoSignature (or indeterminate if unsigned).
static unsigned defaultPriority()
The default priority (99).
bool needToAcceptLicense() const
Whether the repo license has to be accepted, e.g.
void setPriority(unsigned newval_r)
Set repository priority for solver.
RepoInfo(const RepoInfo &)=default
void addContentFrom(const TContainer &container_r)
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
urls_const_iterator baseUrlsBegin() const
iterator that points at begin of repository urls
bool hasContentAll(const TContainer &container_r) const
bool hasLicense() const
Whether there is a license associated with the repo.
bool repoGpgCheckIsMandatory() const
Mandatory check (repoGpgCheck is on) must ask to confirm using unsigned repos.
void setMetadataPath(const Pathname &path)
Set the path where the local metadata is stored.
TriBool validRepoSignature() const
Whether the repo metadata are signed and successfully validated or indeterminate if unsigned.
void setRepoGpgCheck(TriBool value_r)
Set the value for repoGpgCheck (or indeterminate to use the default).
friend std::ostream & operator<<(std::ostream &str, const RepoInfo &obj)
void setMetalinkUrls(url_set urls)
Like setMirrorListUrls but expect metalink format.
Pathname packagesPath() const
Path where this repo packages are cached.
bool hasContentAll(TIterator begin_r, TIterator end_r) const
void addContent(const std::string &keyword_r)
Add content keywords.
bool repoGpgCheck() const
Whether the signature of repo metadata should be checked for this repo.
std::string targetDistribution() const
Distribution for which is this repository meant.
void getRawGpgChecks(TriBool &g_r, TriBool &r_r, TriBool &p_r) const
Raw values for RepoManager.
void setType(const repo::RepoType &t)
set the repository type
bool pkgGpgCheck() const
Whether the signature of rpm packages should be checked for this repo.
Url rawMirrorListUrl() const
The raw mirrorListUrl (no variables replaced).
bool gpgKeyUrlsEmpty() const
Whether gpgkey URLs are defined.
RepoInfo & operator=(RepoInfo &&)=default
Base class implementing common features of RepoInfo and ServiceInfo.
std::string name() const
Repository name.
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
std::unordered_set< Locale > LocaleSet
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
creates and provides information about known sources.
Repository type enumeration.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.