libzypp 17.31.23
zypp::RepoInfo Class Reference

What is known about a repository. More...

#include <RepoInfo.h>

Inheritance diagram for zypp::RepoInfo:

Classes

struct  Impl
 RepoInfo implementation. More...
 

Public Types

typedef std::list< Urlurl_set
 
typedef url_set::size_type urls_size_type
 
typedef transform_iterator< repo::RepoVariablesUrlReplacer, url_set::const_iterator > urls_const_iterator
 

Public Member Functions

 RepoInfo ()
 
virtual ~RepoInfo ()
 
unsigned priority () const
 Repository priority for solver.
 
void setPriority (unsigned newval_r)
 Set repository priority for solver.
 
bool baseUrlsEmpty () const
 whether repository urls are available
 
bool baseUrlSet () const
 Whether there are manualy configured repository urls.
 
urls_size_type baseUrlsSize () const
 number of repository urls
 
urls_const_iterator baseUrlsBegin () const
 iterator that points at begin of repository urls
 
urls_const_iterator baseUrlsEnd () const
 iterator that points at end of repository urls
 
Url url () const
 Pars pro toto: The first repository url.
 
Url rawUrl () const
 Pars pro toto: The first repository raw url (no variables replaced)
 
url_set baseUrls () const
 The complete set of repository urls.
 
url_set rawBaseUrls () const
 The complete set of raw repository urls (no variables replaced)
 
void addBaseUrl (const Url &url)
 Add a base url.
 
void setBaseUrl (const Url &url)
 Clears current base URL list and adds url.
 
void setBaseUrls (url_set urls)
 Clears current base URL list and adds an url_set.
 
Pathname path () const
 Repository path.
 
void setPath (const Pathname &path)
 set the product path.
 
Url mirrorListUrl () const
 Url of a file which contains a list of repository urls.
 
Url rawMirrorListUrl () const
 The raw mirrorListUrl (no variables replaced).
 
void setMirrorListUrl (const Url &url)
 Set mirror list url.
 
void setMirrorListUrls (url_set urls)
 Like setMirrorListUrl but take an url_set.
 
void setMetalinkUrl (const Url &url)
 Like setMirrorListUrl but expect metalink format.
 
void setMetalinkUrls (url_set urls)
 Like setMirrorListUrls but expect metalink format.
 
repo::RepoType type () const
 Type of repository,.
 
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 setType (const repo::RepoType &t)
 set the repository type
 
Pathname metadataPath () const
 Path where this repo metadata was read from.
 
void setMetadataPath (const Pathname &path)
 Set the path where the local metadata is stored.
 
bool usesAutoMethadataPaths () const
 Whether metadataPath uses AUTO% setup.
 
Pathname packagesPath () const
 Path where this repo packages are cached.
 
void setPackagesPath (const Pathname &path)
 set the path where the local packages are stored
 
- Public Member Functions inherited from zypp::repo::RepoInfoBase
 RepoInfoBase ()
 
 RepoInfoBase (const std::string &alias)
 
virtual ~RepoInfoBase ()
 
std::string alias () const
 unique identifier for this source.
 
std::string escaped_alias () const
 Same as alias(), just escaped in a way to be a valid file name.
 
std::string name () const
 Repository name.
 
std::string rawName () const
 The raw metadata name (no default, no variables replaced).
 
std::string label () const
 Label for use in messages for the user interface.
 
std::string asUserString () const
 User string: label (alias or name)
 
bool enabled () const
 If enabled is false, then this repository must be ignored as if does not exists, except when checking for duplicate alias.
 
bool autorefresh () const
 If true, the repostory must be refreshed before creating resolvables from it.
 
Pathname filepath () const
 File where this repo was read from.
 
void setAlias (const std::string &alias)
 set the repository alias
 
void setName (const std::string &name)
 set the repository name
 
void setEnabled (bool enabled)
 enable or disable the repository
 
void setAutorefresh (bool autorefresh)
 enable or disable autorefresh
 
void setFilepath (const Pathname &filename)
 set the path to the .repo file
 
virtual std::ostream & dumpOn (std::ostream &str) const
 Write a human-readable representation of this RepoInfoBase object into the str stream.
 
virtual std::ostream & dumpAsIniOn (std::ostream &str) const
 Write this RepoInfoBase object into str in a .repo (ini) file format.
 
virtual std::ostream & dumpAsXmlOn (std::ostream &str, const std::string &content="") const
 Write an XML representation of this object with content (if available).
 

Static Public Member Functions

static unsigned defaultPriority ()
 The default priority (99).
 
static unsigned noPriority ()
 The least priority (unsigned(-1)).
 

Static Public Attributes

static const RepoInfo noRepo
 Represents no Repository (one with an empty alias).
 

Friends

std::ostream & operator<< (std::ostream &str, const RepoInfo &obj)
 

Related Functions

(Note that these are not member functions.)

typedef shared_ptr< RepoInfoRepoInfo_Ptr
 
typedef shared_ptr< const RepoInfoRepoInfo_constPtr
 
typedef std::list< RepoInfoRepoInfoList
 
std::ostream & operator<< (std::ostream &str, const RepoInfo &obj)
 Stream output.
 

Repository gpgchecks

How signature checking should be performed for this repo.

The values are computed based in the settings of gpgcheck, repo_gpgcheck end pkg_gpgcheck in zypp.conf. Explicitly setting these values in the repositories .repo file will overwrite the defaults from zypp.conf for this repo.

If gpgcheck is on (the default) we will check the signature of repo metadata (packages are secured via checksum inside the metadata). Using unsigned repos needs to be confirmed. Packages from signed repos are accepted if their checksum matches the checksum stated in the repo metadata. Packages from unsigned repos need a valid gpg signature, using unsigned packages needs to be confirmed.

The above default behavior can be tuned by explicitly setting repo_gpgcheck and/or pkg_gpgcheck:

repo_gpgcheck = on same as the default.

repo_gpgcheck = off will silently accept unsigned repos. It will NOT turn of signature checking on the whole. Nevertheless, it's not a secure setting.

pkg_gpgcheck = on will enforce the package signature checking and the need to confirm unsigned packages for all repos (signed and unsigned).

pkg_gpgcheck = off will silently accept unsigned packages. It will NOT turn of signature checking on the whole. Nevertheless, it's not a secure setting.

If gpgCheck is off (not recommneded), no checks are performed. You can still enable them individually by setting repo_gpgcheck and/or pkg_gpgcheck to on.

R: check repo signature is mandatory, confirm unsigned repos
r: check repo signature, unsigned repos are ok but enforce p
: do not check repo signatures
P: check package signature always, confirm unsigned packages
p: like P for unsigned repos, accepted by checksum for signed repos
b: like p but accept unsigned packages
: do not check package signatures
pkg_
gpgcheck 1| * 0 1
------------------------------------
repo_ *1| R/p R/b R/P
0| r/p r/b r/P
pkg_
gpgcheck 0| * 0 1
------------------------------------
repo_ *0| P
1| R R R/P
RepoInfoList repos
Definition: RepoManager.cc:285
enum class  GpgCheck {
  indeterminate , On , Strict , AllowUnsigned ,
  AllowUnsignedRepo , AllowUnsignedPackage , Default , Off
}
 Some predefined settings. More...
 
bool gpgCheck () const
 Whether default signature checking should be performed.
 
void setGpgCheck (TriBool value_r)
 Set the value for gpgCheck (or indeterminate to use the default).
 
void setGpgCheck (bool value_r)
 
bool repoGpgCheck () const
 Whether the signature of repo metadata should be checked for this repo.
 
bool repoGpgCheckIsMandatory () const
 Mandatory check (repoGpgCheck is on) must ask to confirm using unsigned repos.
 
void setRepoGpgCheck (TriBool value_r)
 Set the value for repoGpgCheck (or indeterminate to use the default).
 
bool pkgGpgCheck () const
 Whether the signature of rpm packages should be checked for this repo.
 
bool pkgGpgCheckIsMandatory () const
 Mandatory check (pkgGpgCheck is not off) must ask to confirm using unsigned packages.
 
void setPkgGpgCheck (TriBool value_r)
 Set the value for pkgGpgCheck (or indeterminate to use the default).
 
TriBool validRepoSignature () const
 Whether the repo metadata are signed and successfully validated or indeterminate if unsigned.
 
void setValidRepoSignature (TriBool value_r)
 Set the value for validRepoSignature (or indeterminate if unsigned).
 
bool setGpgCheck (GpgCheck mode_r)
 Adjust *GpgCheck settings according to mode_r.
 
bool gpgKeyUrlsEmpty () const
 Whether gpgkey URLs are defined.
 
urls_size_type gpgKeyUrlsSize () const
 Number of gpgkey URLs defined.
 
url_set gpgKeyUrls () const
 The list of gpgkey URLs defined for this repo.
 
url_set rawGpgKeyUrls () const
 The list of raw gpgkey URLs defined for this repo (no variables replaced)
 
void setGpgKeyUrls (url_set urls)
 Set a list of gpgkey URLs defined for this repo.
 
Url gpgKeyUrl () const
 (leagcy API) The 1st gpgkey URL defined for this repo
 
Url rawGpgKeyUrl () const
 (leagcy API) The 1st raw gpgkey URL defined for this repo (no variables replaced)
 
void setGpgKeyUrl (const Url &gpgkey)
 (leagcy API) Set the gpgkey URL defined for this repo
 
Pathname provideKey (const std::string &keyID_r, const Pathname &targetDirectory_r) const
 downloads all configured gpg keys into the defined directory
 
bool keepPackages () const
 Whether packages downloaded from this repository will be kept in local cache.
 
void setKeepPackages (bool keep)
 Set if packaqes downloaded from this repository will be kept in local cache.
 
std::string service () const
 Gets name of the service to which this repository belongs or empty string if it has been added manually.
 
void setService (const std::string &name)
 sets service which added this repository
 
std::string targetDistribution () const
 Distribution for which is this repository meant.
 
void setTargetDistribution (const std::string &targetDistribution)
 Sets the distribution for which is this repository meant.
 
const std::set< std::string > & contentKeywords () const
 Content keywords defined.
 
void addContent (const std::string &keyword_r)
 Add content keywords.
 
template<class TIterator >
void addContentFrom (TIterator begin_r, TIterator end_r)
 
template<class TContainer >
void addContentFrom (const TContainer &container_r)
 
bool hasContent () const
 Check for content keywords.
 
bool hasContent (const std::string &keyword_r) const
 
template<class TIterator >
bool hasContentAll (TIterator begin_r, TIterator end_r) const
 
template<class TContainer >
bool hasContentAll (const TContainer &container_r) const
 
template<class TIterator >
bool hasContentAny (TIterator begin_r, TIterator end_r) const
 
template<class TContainer >
bool hasContentAny (const TContainer &container_r) const
 

Repository/Product license

In case a repository provides multiple license tarballs in repomd.xml

<data type="license">...</data>
<data type="license-sles">...</data>
<data type="license-sled">...</data>
repo::RepoType type() const
Type of repository,.
Definition: RepoInfo.cc:689

you can address the individual licenses by passing their name (e.g. "sles" to access the type="license-sles"). No on an empty name will refer to type="license".

class RepoManager
 
RWCOW_pointer< Impl_pimpl
 Pointer to implementation.
 
bool hasLicense () const
 Whether there is a license associated with the repo.
 
bool hasLicense (const std::string &name_r) const
 
bool needToAcceptLicense () const
 Whether the repo license has to be accepted, e.g.
 
bool needToAcceptLicense (const std::string &name_r) const
 
std::string getLicense (const Locale &lang_r=Locale()) const
 Return the best license for the current (or a specified) locale.
 
std::string getLicense (const Locale &lang_r=Locale())
 
std::string getLicense (const std::string &name_r, const Locale &lang_r=Locale()) const
 
LocaleSet getLicenseLocales () const
 Return the locales the license is available for.
 
LocaleSet getLicenseLocales (const std::string &name_r) const
 
bool requireStatusWithMediaFile () const
 Returns true if this repository requires the media.1/media file to be included in the metadata status and repo status calculations.
 
virtual std::ostream & dumpOn (std::ostream &str) const
 Write a human-readable representation of this RepoInfo object into the str stream.
 
virtual std::ostream & dumpAsIniOn (std::ostream &str) const
 Write this RepoInfo object into str in a .repo file format.
 
virtual std::ostream & dumpAsXmlOn (std::ostream &str, const std::string &content="") const
 Write an XML representation of this RepoInfo object.
 
void getRawGpgChecks (TriBool &g_r, TriBool &r_r, TriBool &p_r) const
 Raw values for RepoManager.
 

Detailed Description

What is known about a repository.

The class RepoInfo represents everything that is known about a software repository.

It can be used to store information about known sources.

This class tries to be compatible with the concept of a .repo file used by YUM and also available in the openSUSE build service. See man yum.conf.

Example file

[ruby]
name=Ruby repository (openSUSE_10.2)
type=rpm-md
baseurl=http://software.opensuse.org/download/ruby/openSUSE_10.2/
http://some.opensuse.mirror/ruby/openSUSE_10.2/
gpgcheck=1
gpgkey=http://software.opensuse.org/openSUSE-Build-Service.asc
unsigned priority() const
Repository priority for solver.
Definition: RepoInfo.cc:391
std::string name() const
Repository name.
bool enabled() const
If enabled is false, then this repository must be ignored as if does not exists, except when checking...
Note
A RepoInfo is a hint about how to create a Repository.
Name, baseUrls and mirrorUrl are subject to repo variable replacement (
See also
RepoVariablesStringReplacer).

Definition at line 71 of file RepoInfo.h.

Member Typedef Documentation

◆ url_set

typedef std::list<Url> zypp::RepoInfo::url_set

Definition at line 103 of file RepoInfo.h.

◆ urls_size_type

typedef url_set::size_type zypp::RepoInfo::urls_size_type

Definition at line 104 of file RepoInfo.h.

◆ urls_const_iterator

Definition at line 105 of file RepoInfo.h.

Member Enumeration Documentation

◆ GpgCheck

enum class zypp::RepoInfo::GpgCheck
strong

Some predefined settings.

Enumerator
indeterminate 
On 
Strict 
AllowUnsigned 
AllowUnsignedRepo 
AllowUnsignedPackage 
Default 
Off 

Definition at line 368 of file RepoInfo.h.

Constructor & Destructor Documentation

◆ RepoInfo()

zypp::RepoInfo::RepoInfo ( )

Definition at line 384 of file RepoInfo.cc.

◆ ~RepoInfo()

zypp::RepoInfo::~RepoInfo ( )
virtual

Definition at line 388 of file RepoInfo.cc.

Member Function Documentation

◆ defaultPriority()

unsigned zypp::RepoInfo::defaultPriority ( )
static

The default priority (99).

Definition at line 394 of file RepoInfo.cc.

◆ noPriority()

unsigned zypp::RepoInfo::noPriority ( )
static

The least priority (unsigned(-1)).

Definition at line 397 of file RepoInfo.cc.

◆ priority()

unsigned zypp::RepoInfo::priority ( ) const

Repository priority for solver.

Some number between 1 (highest priority) and 99 (defaultPriority).

Definition at line 391 of file RepoInfo.cc.

◆ setPriority()

void zypp::RepoInfo::setPriority ( unsigned  newval_r)

Set repository priority for solver.

A newval_r of 0 sets the default priority.

See also
priority.

Definition at line 400 of file RepoInfo.cc.

◆ baseUrlsEmpty()

bool zypp::RepoInfo::baseUrlsEmpty ( ) const

whether repository urls are available

Definition at line 743 of file RepoInfo.cc.

◆ baseUrlSet()

bool zypp::RepoInfo::baseUrlSet ( ) const

Whether there are manualy configured repository urls.

If false, a mirrorlist might be used.

Definition at line 746 of file RepoInfo.cc.

◆ baseUrlsSize()

RepoInfo::urls_size_type zypp::RepoInfo::baseUrlsSize ( ) const

number of repository urls

Definition at line 740 of file RepoInfo.cc.

◆ baseUrlsBegin()

RepoInfo::urls_const_iterator zypp::RepoInfo::baseUrlsBegin ( ) const

iterator that points at begin of repository urls

Definition at line 734 of file RepoInfo.cc.

◆ baseUrlsEnd()

RepoInfo::urls_const_iterator zypp::RepoInfo::baseUrlsEnd ( ) const

iterator that points at end of repository urls

Definition at line 737 of file RepoInfo.cc.

◆ url()

Url zypp::RepoInfo::url ( ) const
inline

Pars pro toto: The first repository url.

Definition at line 131 of file RepoInfo.h.

◆ rawUrl()

Url zypp::RepoInfo::rawUrl ( ) const

Pars pro toto: The first repository raw url (no variables replaced)

Definition at line 731 of file RepoInfo.cc.

◆ baseUrls()

RepoInfo::url_set zypp::RepoInfo::baseUrls ( ) const

The complete set of repository urls.

These are either the configured baseurls, or if empty, the downloaded mirror list (

See also
mirrorListUrl)

Definition at line 716 of file RepoInfo.cc.

◆ rawBaseUrls()

RepoInfo::url_set zypp::RepoInfo::rawBaseUrls ( ) const

The complete set of raw repository urls (no variables replaced)

Definition at line 719 of file RepoInfo.cc.

◆ addBaseUrl()

void zypp::RepoInfo::addBaseUrl ( const Url url)

Add a base url.

See also
baseUrls
Parameters
urlThe base url for the repository.

To recreate the base URLs list, use setBaseUrl(const Url &) followed by addBaseUrl().

Definition at line 635 of file RepoInfo.cc.

◆ setBaseUrl()

void zypp::RepoInfo::setBaseUrl ( const Url url)

Clears current base URL list and adds url.

Definition at line 643 of file RepoInfo.cc.

◆ setBaseUrls()

void zypp::RepoInfo::setBaseUrls ( url_set  urls)

Clears current base URL list and adds an url_set.

Definition at line 649 of file RepoInfo.cc.

◆ path()

Pathname zypp::RepoInfo::path ( ) const

Repository path.

Pathname relative to the base Url where the product/repository is located

For media containing more than one product, or repositories not located at the root of the media it is important to know the path to the product directory relative to the media root. So a media verifier can be set for that media. You may also read it as baseUrl = url to mount and path = path on the mounted media.

It is not mandatory, and the default is /.

Note
As a repository can have multiple Urls, the path is unique and the same for all Urls, so it is assumed all the Urls have the same media layout.

Definition at line 722 of file RepoInfo.cc.

◆ setPath()

void zypp::RepoInfo::setPath ( const Pathname path)

set the product path.

See also
path()
Parameters
paththe path to the product

Definition at line 652 of file RepoInfo.cc.

◆ mirrorListUrl()

Url zypp::RepoInfo::mirrorListUrl ( ) const

Url of a file which contains a list of repository urls.

Definition at line 692 of file RepoInfo.cc.

◆ rawMirrorListUrl()

Url zypp::RepoInfo::rawMirrorListUrl ( ) const

The raw mirrorListUrl (no variables replaced).

Definition at line 695 of file RepoInfo.cc.

◆ setMirrorListUrl()

void zypp::RepoInfo::setMirrorListUrl ( const Url url)

Set mirror list url.

See also
mirrorListUrl
Parameters
urlThe base url for the list

Definition at line 515 of file RepoInfo.cc.

◆ setMirrorListUrls()

void zypp::RepoInfo::setMirrorListUrls ( url_set  urls)

Like setMirrorListUrl but take an url_set.

Definition at line 518 of file RepoInfo.cc.

◆ setMetalinkUrl()

void zypp::RepoInfo::setMetalinkUrl ( const Url url)

Like setMirrorListUrl but expect metalink format.

Definition at line 521 of file RepoInfo.cc.

◆ setMetalinkUrls()

void zypp::RepoInfo::setMetalinkUrls ( url_set  urls)

Like setMirrorListUrls but expect metalink format.

Definition at line 524 of file RepoInfo.cc.

◆ type()

repo::RepoType zypp::RepoInfo::type ( ) const

Type of repository,.

Definition at line 689 of file RepoInfo.cc.

◆ setProbedType()

void zypp::RepoInfo::setProbedType ( const repo::RepoType t) const

This allows to adjust the RepoType lazy, from NONE to some probed value, even for const objects.

This is a NOOP if the current type is not NONE.

Definition at line 658 of file RepoInfo.cc.

◆ setType()

void zypp::RepoInfo::setType ( const repo::RepoType t)

set the repository type

See also
type
Parameters
t

Definition at line 655 of file RepoInfo.cc.

◆ metadataPath()

Pathname zypp::RepoInfo::metadataPath ( ) const

Path where this repo metadata was read from.

Note
could be an empty pathname for repo infos created in memory.

Definition at line 680 of file RepoInfo.cc.

◆ setMetadataPath()

void zypp::RepoInfo::setMetadataPath ( const Pathname path)

Set the path where the local metadata is stored.

The path to the repositories metadata is usually provided by the RepoManager. If you want to use a temporary repository (not under RepoManagers control), and you set a metadataPath with basename AUTO%, all data directories (raw metadata, solv file and package cache) will be created by replacing AUTO% with RAW%, SLV% or PKG% . This will change the value of packagesPath accordingly, unless you assigned a custom value using setPackagesPath.

RepoInfo repo;
repo.setAlias( "Temp" );
repo.setBaseUrl( Url("http://someserver/somepath/") );
repo.setMetadataPath( "/tmp/temprepodata/%AUTO%" );
// will use
// /tmp/temprepodata/%RAW% - raw metadata
// /%SLV% - solv file
// /%PKG% - packages
What is known about a repository.
Definition: RepoInfo.h:72
void setBaseUrl(const Url &url)
Clears current base URL list and adds url.
Definition: RepoInfo.cc:643
void setMetadataPath(const Pathname &path)
Set the path where the local metadata is stored.
Definition: RepoInfo.cc:662
Url manipulation class.
Definition: Url.h:92
void setAlias(const std::string &alias)
set the repository alias
Definition: RepoInfoBase.cc:94
Parameters
pathdirectory path

Definition at line 662 of file RepoInfo.cc.

◆ usesAutoMethadataPaths()

bool zypp::RepoInfo::usesAutoMethadataPaths ( ) const

Whether metadataPath uses AUTO% setup.

Definition at line 686 of file RepoInfo.cc.

◆ packagesPath()

Pathname zypp::RepoInfo::packagesPath ( ) const

Path where this repo packages are cached.

Definition at line 683 of file RepoInfo.cc.

◆ setPackagesPath()

void zypp::RepoInfo::setPackagesPath ( const Pathname path)

set the path where the local packages are stored

Parameters
pathdirectory path

Definition at line 665 of file RepoInfo.cc.

◆ gpgCheck()

bool zypp::RepoInfo::gpgCheck ( ) const

Whether default signature checking should be performed.

Definition at line 404 of file RepoInfo.cc.

◆ setGpgCheck() [1/3]

void zypp::RepoInfo::setGpgCheck ( TriBool  value_r)

Set the value for gpgCheck (or indeterminate to use the default).

Definition at line 407 of file RepoInfo.cc.

◆ setGpgCheck() [2/3]

void zypp::RepoInfo::setGpgCheck ( bool  value_r)

Definition at line 410 of file RepoInfo.cc.

◆ repoGpgCheck()

bool zypp::RepoInfo::repoGpgCheck ( ) const

Whether the signature of repo metadata should be checked for this repo.

Definition at line 414 of file RepoInfo.cc.

◆ repoGpgCheckIsMandatory()

bool zypp::RepoInfo::repoGpgCheckIsMandatory ( ) const

Mandatory check (repoGpgCheck is on) must ask to confirm using unsigned repos.

Definition at line 417 of file RepoInfo.cc.

◆ setRepoGpgCheck()

void zypp::RepoInfo::setRepoGpgCheck ( TriBool  value_r)

Set the value for repoGpgCheck (or indeterminate to use the default).

Definition at line 425 of file RepoInfo.cc.

◆ pkgGpgCheck()

bool zypp::RepoInfo::pkgGpgCheck ( ) const

Whether the signature of rpm packages should be checked for this repo.

Definition at line 429 of file RepoInfo.cc.

◆ pkgGpgCheckIsMandatory()

bool zypp::RepoInfo::pkgGpgCheckIsMandatory ( ) const

Mandatory check (pkgGpgCheck is not off) must ask to confirm using unsigned packages.

Definition at line 432 of file RepoInfo.cc.

◆ setPkgGpgCheck()

void zypp::RepoInfo::setPkgGpgCheck ( TriBool  value_r)

Set the value for pkgGpgCheck (or indeterminate to use the default).

Definition at line 435 of file RepoInfo.cc.

◆ validRepoSignature()

TriBool zypp::RepoInfo::validRepoSignature ( ) const

Whether the repo metadata are signed and successfully validated or indeterminate if unsigned.

The value is usually set by repo::Downloader when retrieving the metadata.

Definition at line 447 of file RepoInfo.cc.

◆ setValidRepoSignature()

void zypp::RepoInfo::setValidRepoSignature ( TriBool  value_r)

Set the value for validRepoSignature (or indeterminate if unsigned).

Definition at line 454 of file RepoInfo.cc.

◆ setGpgCheck() [3/3]

bool zypp::RepoInfo::setGpgCheck ( GpgCheck  mode_r)

Adjust *GpgCheck settings according to mode_r.

GpgCheck::indeterminate will leave the settings as they are.

Returns
whether setting were changed

Definition at line 473 of file RepoInfo.cc.

◆ gpgKeyUrlsEmpty()

bool zypp::RepoInfo::gpgKeyUrlsEmpty ( ) const

Whether gpgkey URLs are defined.

Definition at line 698 of file RepoInfo.cc.

◆ gpgKeyUrlsSize()

RepoInfo::urls_size_type zypp::RepoInfo::gpgKeyUrlsSize ( ) const

Number of gpgkey URLs defined.

Definition at line 701 of file RepoInfo.cc.

◆ gpgKeyUrls()

RepoInfo::url_set zypp::RepoInfo::gpgKeyUrls ( ) const

The list of gpgkey URLs defined for this repo.

Definition at line 704 of file RepoInfo.cc.

◆ rawGpgKeyUrls()

RepoInfo::url_set zypp::RepoInfo::rawGpgKeyUrls ( ) const

The list of raw gpgkey URLs defined for this repo (no variables replaced)

Definition at line 707 of file RepoInfo.cc.

◆ setGpgKeyUrls()

void zypp::RepoInfo::setGpgKeyUrls ( url_set  urls)

Set a list of gpgkey URLs defined for this repo.

Definition at line 527 of file RepoInfo.cc.

◆ gpgKeyUrl()

Url zypp::RepoInfo::gpgKeyUrl ( ) const

(leagcy API) The 1st gpgkey URL defined for this repo

Definition at line 710 of file RepoInfo.cc.

◆ rawGpgKeyUrl()

Url zypp::RepoInfo::rawGpgKeyUrl ( ) const

(leagcy API) The 1st raw gpgkey URL defined for this repo (no variables replaced)

Definition at line 713 of file RepoInfo.cc.

◆ setGpgKeyUrl()

void zypp::RepoInfo::setGpgKeyUrl ( const Url gpgkey)

(leagcy API) Set the gpgkey URL defined for this repo

Definition at line 530 of file RepoInfo.cc.

◆ provideKey()

Pathname zypp::RepoInfo::provideKey ( const std::string &  keyID_r,
const Pathname targetDirectory_r 
) const

downloads all configured gpg keys into the defined directory

Definition at line 536 of file RepoInfo.cc.

◆ keepPackages()

bool zypp::RepoInfo::keepPackages ( ) const

Whether packages downloaded from this repository will be kept in local cache.

Definition at line 677 of file RepoInfo.cc.

◆ setKeepPackages()

void zypp::RepoInfo::setKeepPackages ( bool  keep)

Set if packaqes downloaded from this repository will be kept in local cache.

If the setting is true, all downloaded packages from this repository will be copied to the local raw cache.

Parameters
keeptrue (keep the downloaded packages) or false (delete them after installation)

Definition at line 668 of file RepoInfo.cc.

◆ service()

std::string zypp::RepoInfo::service ( ) const

Gets name of the service to which this repository belongs or empty string if it has been added manually.

Definition at line 725 of file RepoInfo.cc.

◆ setService()

void zypp::RepoInfo::setService ( const std::string &  name)

sets service which added this repository

Definition at line 671 of file RepoInfo.cc.

◆ targetDistribution()

std::string zypp::RepoInfo::targetDistribution ( ) const

Distribution for which is this repository meant.

Definition at line 728 of file RepoInfo.cc.

◆ setTargetDistribution()

void zypp::RepoInfo::setTargetDistribution ( const std::string &  targetDistribution)

Sets the distribution for which is this repository meant.

This is an in-memory value only, does not get written to the .repo file upon saving.

Definition at line 674 of file RepoInfo.cc.

◆ contentKeywords()

const std::set< std::string > & zypp::RepoInfo::contentKeywords ( ) const

Content keywords defined.

Definition at line 749 of file RepoInfo.cc.

◆ addContent()

void zypp::RepoInfo::addContent ( const std::string &  keyword_r)

Add content keywords.

Definition at line 752 of file RepoInfo.cc.

◆ addContentFrom() [1/2]

template<class TIterator >
void zypp::RepoInfo::addContentFrom ( TIterator  begin_r,
TIterator  end_r 
)
inline

Definition at line 453 of file RepoInfo.h.

◆ addContentFrom() [2/2]

template<class TContainer >
void zypp::RepoInfo::addContentFrom ( const TContainer &  container_r)
inline

Definition at line 457 of file RepoInfo.h.

◆ hasContent() [1/2]

bool zypp::RepoInfo::hasContent ( ) const

Check for content keywords.

They may be missing due to missing metadata in disabled repos.

Definition at line 755 of file RepoInfo.cc.

◆ hasContent() [2/2]

bool zypp::RepoInfo::hasContent ( const std::string &  keyword_r) const

Definition at line 758 of file RepoInfo.cc.

◆ hasContentAll() [1/2]

template<class TIterator >
bool zypp::RepoInfo::hasContentAll ( TIterator  begin_r,
TIterator  end_r 
) const
inline

Definition at line 468 of file RepoInfo.h.

◆ hasContentAll() [2/2]

template<class TContainer >
bool zypp::RepoInfo::hasContentAll ( const TContainer &  container_r) const
inline

Definition at line 472 of file RepoInfo.h.

◆ hasContentAny() [1/2]

template<class TIterator >
bool zypp::RepoInfo::hasContentAny ( TIterator  begin_r,
TIterator  end_r 
) const
inline

Definition at line 476 of file RepoInfo.h.

◆ hasContentAny() [2/2]

template<class TContainer >
bool zypp::RepoInfo::hasContentAny ( const TContainer &  container_r) const
inline

Definition at line 480 of file RepoInfo.h.

◆ hasLicense() [1/2]

bool zypp::RepoInfo::hasLicense ( ) const

Whether there is a license associated with the repo.

Definition at line 763 of file RepoInfo.cc.

◆ hasLicense() [2/2]

bool zypp::RepoInfo::hasLicense ( const std::string &  name_r) const

Definition at line 766 of file RepoInfo.cc.

◆ needToAcceptLicense() [1/2]

bool zypp::RepoInfo::needToAcceptLicense ( ) const

Whether the repo license has to be accepted, e.g.

there is no no acceptance needed for openSUSE.

Definition at line 770 of file RepoInfo.cc.

◆ needToAcceptLicense() [2/2]

bool zypp::RepoInfo::needToAcceptLicense ( const std::string &  name_r) const

Definition at line 773 of file RepoInfo.cc.

◆ getLicense() [1/3]

std::string zypp::RepoInfo::getLicense ( const Locale lang_r = Locale()) const

Return the best license for the current (or a specified) locale.

Definition at line 805 of file RepoInfo.cc.

◆ getLicense() [2/3]

std::string zypp::RepoInfo::getLicense ( const Locale lang_r = Locale())

Definition at line 802 of file RepoInfo.cc.

◆ getLicense() [3/3]

std::string zypp::RepoInfo::getLicense ( const std::string &  name_r,
const Locale lang_r = Locale() 
) const

Definition at line 808 of file RepoInfo.cc.

◆ getLicenseLocales() [1/2]

LocaleSet zypp::RepoInfo::getLicenseLocales ( ) const

Return the locales the license is available for.

Locale::noCode is included in case of license.txt which does not specify a specific locale.

Definition at line 849 of file RepoInfo.cc.

◆ getLicenseLocales() [2/2]

LocaleSet zypp::RepoInfo::getLicenseLocales ( const std::string &  name_r) const

Definition at line 852 of file RepoInfo.cc.

◆ requireStatusWithMediaFile()

bool zypp::RepoInfo::requireStatusWithMediaFile ( ) const

Returns true if this repository requires the media.1/media file to be included in the metadata status and repo status calculations.

Definition at line 1051 of file RepoInfo.cc.

◆ dumpOn()

std::ostream & zypp::RepoInfo::dumpOn ( std::ostream &  str) const
virtual

Write a human-readable representation of this RepoInfo object into the str stream.

Useful for logging.

Reimplemented from zypp::repo::RepoInfoBase.

Definition at line 885 of file RepoInfo.cc.

◆ dumpAsIniOn()

std::ostream & zypp::RepoInfo::dumpAsIniOn ( std::ostream &  str) const
virtual

Write this RepoInfo object into str in a .repo file format.

Raw values, no variable replacement.

Reimplemented from zypp::repo::RepoInfoBase.

Definition at line 933 of file RepoInfo.cc.

◆ dumpAsXmlOn()

std::ostream & zypp::RepoInfo::dumpAsXmlOn ( std::ostream &  str,
const std::string &  content = "" 
) const
virtual

Write an XML representation of this RepoInfo object.

Repo variables replaced.

Parameters
str
contentthis argument is ignored (used in other classed derived from RepoInfoBase.

Reimplemented from zypp::repo::RepoInfoBase.

Definition at line 988 of file RepoInfo.cc.

◆ getRawGpgChecks()

void zypp::RepoInfo::getRawGpgChecks ( TriBool g_r,
TriBool r_r,
TriBool p_r 
) const
private

Raw values for RepoManager.

Definition at line 439 of file RepoInfo.cc.

Friends And Related Function Documentation

◆ RepoInfo_Ptr

typedef shared_ptr<RepoInfo> RepoInfo_Ptr
related

Definition at line 565 of file RepoInfo.h.

◆ RepoInfo_constPtr

typedef shared_ptr<const RepoInfo> RepoInfo_constPtr
related

Definition at line 567 of file RepoInfo.h.

◆ RepoInfoList

typedef std::list<RepoInfo> RepoInfoList
related

Definition at line 569 of file RepoInfo.h.

◆ RepoManager

friend class RepoManager
friend

Definition at line 555 of file RepoInfo.h.

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream &  str,
const RepoInfo obj 
)
friend

Definition at line 1028 of file RepoInfo.cc.

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream &  str,
const RepoInfo obj 
)
related

Stream output.

Definition at line 1028 of file RepoInfo.cc.

Member Data Documentation

◆ noRepo

const RepoInfo zypp::RepoInfo::noRepo
static

Represents no Repository (one with an empty alias).

Definition at line 80 of file RepoInfo.h.

◆ _pimpl

RWCOW_pointer<Impl> zypp::RepoInfo::_pimpl
private

Pointer to implementation.

Definition at line 560 of file RepoInfo.h.


The documentation for this class was generated from the following files: