libzypp 17.37.17
|
creates and provides information about known sources. More...
#include <zypp/RepoManager.h>
Classes | |
class | Impl |
RepoManager implementation. More... | |
struct | MatchServiceAlias |
Functor thats filter RepoInfo by service which it belongs to. More... |
Public Types | |
using | ServiceSet = std::set<ServiceInfo> |
ServiceInfo typedefs. | |
using | ServiceConstIterator = ServiceSet::const_iterator |
using | ServiceSizeType = ServiceSet::size_type |
using | RepoSet = std::set<RepoInfo> |
RepoInfo typedefs. | |
using | RepoConstIterator = RepoSet::const_iterator |
using | RepoSizeType = RepoSet::size_type |
using | RawMetadataRefreshPolicy = RepoManagerFlags::RawMetadataRefreshPolicy |
using | CacheBuildPolicy = RepoManagerFlags::CacheBuildPolicy |
using | RefreshServiceBit = RepoManagerFlags::RefreshServiceBit |
Flags for tuning RefreshService. | |
using | RefreshServiceFlags = RepoManagerFlags::RefreshServiceFlags |
using | RefreshServiceOptions = RepoManagerFlags::RefreshServiceFlags |
Options tuning RefreshService. |
Public Member Functions | |
RepoManager (RepoManagerOptions options=RepoManagerOptions()) | |
~RepoManager () | |
Dtor. |
Static Public Attributes | |
static constexpr RawMetadataRefreshPolicy | RefreshIfNeeded = RepoManagerFlags::RefreshIfNeeded |
static constexpr RawMetadataRefreshPolicy | RefreshForced = RepoManagerFlags::RefreshForced |
static constexpr RawMetadataRefreshPolicy | RefreshIfNeededIgnoreDelay = RepoManagerFlags::RefreshIfNeededIgnoreDelay |
static constexpr CacheBuildPolicy | BuildIfNeeded = CacheBuildPolicy::BuildIfNeeded |
static constexpr CacheBuildPolicy | BuildForced = CacheBuildPolicy::BuildForced |
static constexpr RefreshServiceBit | RefreshService_restoreStatus = RefreshServiceBit::RefreshService_restoreStatus |
static constexpr RefreshServiceBit | RefreshService_forceRefresh = RefreshServiceBit::RefreshService_forceRefresh |
Friends | |
std::ostream & | operator<< (std::ostream &str, const RepoManager &obj) |
Related Symbols | |
(Note that these are not member symbols.) | |
std::ostream & | operator<< (std::ostream &str, const RepoManager::Impl &obj) |
Stream output. | |
std::ostream & | operator<< (std::ostream &str, const RepoManager &obj) ZYPP_API |
Stream output. |
Known repositories. | |
The known repositories are read from RepoManagerOptions::knownReposPath passed on the Ctor. Which defaults to ZYpp global settings. | |
using | RefreshCheckStatus = RepoManagerFlags::RefreshCheckStatus |
static constexpr RefreshCheckStatus | REFRESH_NEEDED = RefreshCheckStatus::REFRESH_NEEDED |
refresh is needed | |
static constexpr RefreshCheckStatus | REPO_UP_TO_DATE = RefreshCheckStatus::REPO_UP_TO_DATE |
repository not changed | |
static constexpr RefreshCheckStatus | REPO_CHECK_DELAYED = RefreshCheckStatus::REPO_CHECK_DELAYED |
refresh is delayed due to settings | |
bool | repoEmpty () const |
RepoSizeType | repoSize () const |
RepoConstIterator | repoBegin () const |
RepoConstIterator | repoEnd () const |
Iterable< RepoConstIterator > | repos () const |
Iterate the known repositories. | |
std::list< RepoInfo > | knownRepositories () const |
List of known repositories. | |
RepoInfo | getRepo (const std::string &alias) const |
Find RepoInfo by alias or return RepoInfo::noRepo. | |
RepoInfo | getRepo (const RepoInfo &info_r) const |
bool | hasRepo (const std::string &alias) const |
Return whether there is a known repository for alias . | |
bool | hasRepo (const RepoInfo &info_r) const |
RepoStatus | metadataStatus (const RepoInfo &info) const |
Status of local metadata. | |
RefreshCheckStatus | checkIfToRefreshMetadata (const RepoInfo &info, const Url &url, RawMetadataRefreshPolicy policy=RefreshIfNeeded) |
Checks whether to refresh metadata for specified repository and url. | |
RefreshCheckStatus | checkIfToRefreshMetadata (const RepoInfo &info, const zypp::MirroredOrigin &origin, RawMetadataRefreshPolicy policy=RefreshIfNeeded) |
Overload for checkIfToRefreshMetadata using a zypp::MirroredOrigin to check if to refresh metadata. | |
Pathname | metadataPath (const RepoInfo &info) const |
Path where the metadata is downloaded and kept. | |
Pathname | packagesPath (const RepoInfo &info) const |
Path where the rpm packages are downloaded and kept. | |
void | refreshMetadata (const RepoInfo &info, RawMetadataRefreshPolicy policy=RefreshIfNeeded, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Refresh local raw cache. | |
void | cleanMetadata (const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Clean local metadata. | |
void | cleanPackages (const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Clean local package cache. | |
RepoStatus | cacheStatus (const RepoInfo &info) const |
Status of metadata cache. | |
void | buildCache (const RepoInfo &info, CacheBuildPolicy policy=BuildIfNeeded, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Refresh local cache. | |
void | cleanCache (const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
clean local cache | |
bool | isCached (const RepoInfo &info) const |
Whether a repository exists in cache. | |
void | loadFromCache (const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Load resolvables into the pool. | |
void | cleanCacheDirGarbage (const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Remove any subdirectories of cache directories which no longer belong to any of known repositories. | |
repo::RepoType | probe (const Url &url, const Pathname &path) const |
Probe repo metadata type. | |
repo::RepoType | probe (const Url &url) const |
void | addRepository (const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Adds a repository to the list of known repositories. | |
void | addRepository (const RepoInfo &info, const TriBool &forcedProbe, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
void | addRepositories (const Url &url, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Adds repositores from a repo file to the list of known repositories. | |
void | removeRepository (const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Remove the best matching repository from known repos list. | |
void | modifyRepository (const std::string &alias, const RepoInfo &newinfo, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Modify repository attributes. | |
void | modifyRepository (const RepoInfo &newinfo, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
RepoInfo | getRepositoryInfo (const std::string &alias, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Find a matching repository info. | |
RepoInfo | getRepositoryInfo (const Url &url, const url::ViewOption &urlview=url::ViewOption::DEFAULTS, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc()) |
Find repository info by URL. | |
static std::string | makeStupidAlias (const Url &url_r=Url()) |
Some stupid string but suitable as alias for your url if nothing better is available. |
Known services. | |
The known services are read from RepoManagerOptions::knownServicesPath passed on the Ctor. Which defaults to ZYpp global settings. | |
RWCOW_pointer< Impl > | _pimpl |
Pointer to implementation. | |
bool | serviceEmpty () const |
Gets true if no service is in RepoManager (so no one in specified location) | |
ServiceSizeType | serviceSize () const |
Gets count of service in RepoManager (in specified location) | |
ServiceConstIterator | serviceBegin () const |
Iterator to first service in internal storage. | |
ServiceConstIterator | serviceEnd () const |
Iterator to place behind last service in internal storage. | |
Iterable< ServiceConstIterator > | services () const |
Iterate the known services. | |
std::list< ServiceInfo > | knownServices () const |
List of known services. | |
ServiceInfo | getService (const std::string &alias) const |
Finds ServiceInfo by alias or return ServiceInfo::noService. | |
bool | hasService (const std::string &alias) const |
Return whether there is a known service for alias . | |
repo::ServiceType | probeService (const Url &url) const |
Probe the type or the service. | |
void | addService (const std::string &alias, const Url &url) |
Adds a new service by its alias and URL. | |
void | addService (const ServiceInfo &service) |
Adds new service. | |
void | removeService (const std::string &alias) |
Removes service specified by its name. | |
void | removeService (const ServiceInfo &service) |
void | refreshServices (const RefreshServiceOptions &options_r=RefreshServiceOptions()) |
Refreshes all enabled services. | |
void | refreshService (const std::string &alias, const RefreshServiceOptions &options_r=RefreshServiceOptions()) |
Refresh specific service. | |
void | refreshService (const ServiceInfo &service, const RefreshServiceOptions &options_r=RefreshServiceOptions()) |
void | modifyService (const std::string &oldAlias, const ServiceInfo &service) |
Modifies service file (rewrites it with new values) and underlying repositories if needed. | |
void | modifyService (const ServiceInfo &service) |
void | refreshGeoIp (const RepoInfo::url_set &urls) |
template<typename OutputIterator> | |
void | getRepositoriesInService (const std::string &alias, OutputIterator out) const |
fill to output iterator repositories in service name. |
creates and provides information about known sources.
Definition at line 59 of file RepoManager.h.
using zypp::RepoManager::ServiceSet = std::set<ServiceInfo> |
ServiceInfo typedefs.
Definition at line 68 of file RepoManager.h.
using zypp::RepoManager::ServiceConstIterator = ServiceSet::const_iterator |
Definition at line 69 of file RepoManager.h.
using zypp::RepoManager::ServiceSizeType = ServiceSet::size_type |
Definition at line 70 of file RepoManager.h.
using zypp::RepoManager::RepoSet = std::set<RepoInfo> |
RepoInfo typedefs.
Definition at line 73 of file RepoManager.h.
using zypp::RepoManager::RepoConstIterator = RepoSet::const_iterator |
Definition at line 74 of file RepoManager.h.
using zypp::RepoManager::RepoSizeType = RepoSet::size_type |
Definition at line 75 of file RepoManager.h.
Definition at line 82 of file RepoManager.h.
Definition at line 87 of file RepoManager.h.
Flags for tuning RefreshService.
Definition at line 92 of file RepoManager.h.
using zypp::RepoManager::RefreshServiceFlags = RepoManagerFlags::RefreshServiceFlags |
Definition at line 96 of file RepoManager.h.
using zypp::RepoManager::RefreshServiceOptions = RepoManagerFlags::RefreshServiceFlags |
Options tuning RefreshService.
Definition at line 99 of file RepoManager.h.
Definition at line 141 of file RepoManager.h.
zypp::RepoManager::RepoManager | ( | RepoManagerOptions | options = RepoManagerOptions() | ) |
Definition at line 239 of file repomanager.cc.
zypp::RepoManager::~RepoManager | ( | ) |
Dtor.
Definition at line 84 of file RepoManager.cc.
bool zypp::RepoManager::repoEmpty | ( | ) | const |
Definition at line 87 of file RepoManager.cc.
RepoManager::RepoSizeType zypp::RepoManager::repoSize | ( | ) | const |
Definition at line 90 of file RepoManager.cc.
RepoManager::RepoConstIterator zypp::RepoManager::repoBegin | ( | ) | const |
Definition at line 93 of file RepoManager.cc.
RepoManager::RepoConstIterator zypp::RepoManager::repoEnd | ( | ) | const |
Definition at line 96 of file RepoManager.cc.
|
inline |
Iterate the known repositories.
Definition at line 671 of file RepoManager.h.
|
inline |
List of known repositories.
Definition at line 115 of file RepoManager.h.
RepoInfo zypp::RepoManager::getRepo | ( | const std::string & | alias | ) | const |
Find RepoInfo by alias or return RepoInfo::noRepo.
Definition at line 99 of file RepoManager.cc.
Definition at line 121 of file RepoManager.h.
bool zypp::RepoManager::hasRepo | ( | const std::string & | alias | ) | const |
Return whether there is a known repository for alias
.
Definition at line 102 of file RepoManager.cc.
Definition at line 127 of file RepoManager.h.
Some stupid string but suitable as alias for your url if nothing better is available.
Something like "http-download.opensuse.org-83df67e5"
Definition at line 105 of file RepoManager.cc.
RepoStatus zypp::RepoManager::metadataStatus | ( | const RepoInfo & | info | ) | const |
Status of local metadata.
Definition at line 125 of file RepoManager.cc.
RepoManager::RefreshCheckStatus zypp::RepoManager::checkIfToRefreshMetadata | ( | const RepoInfo & | info, |
const Url & | url, | ||
RawMetadataRefreshPolicy | policy = RefreshIfNeeded ) |
Checks whether to refresh metadata for specified repository and url.
The need for refresh is evaluated according to the following conditions, in that order:
This method checks the status against the specified url only. If more baseurls are defined for in the RepoInfo, each one must be check individually. Example:
RepoInfo info;
// try urls one by one
for ( RepoInfo::urls_const_iterator it = info.baseUrlsBegin();
it != info.baseUrlsEnd(); ++it )
{
try
{
// check whether to refresh metadata
// if the check fails for this url, it throws, so another url will be checked
if (checkIfToRefreshMetadata(info, *it, policy)!=RepoInfo::REFRESH_NEEDED)
return;
// do the actual refresh
}
catch (const Exception & e)
{
ZYPP_CAUGHT(e);
ERR << *it << " doesn't look good. Trying another url." << endl;
}
} // for all urls
handle("No more URLs.");
info | |
url | |
policy |
RepoUnknownTypeException | |
repo::RepoNoAliasException | if can't figure an alias |
Exception | on unknown error |
Definition at line 131 of file RepoManager.cc.
RepoManager::RefreshCheckStatus zypp::RepoManager::checkIfToRefreshMetadata | ( | const RepoInfo & | info, |
const zypp::MirroredOrigin & | origin, | ||
RawMetadataRefreshPolicy | policy = RefreshIfNeeded ) |
Overload for checkIfToRefreshMetadata using a zypp::MirroredOrigin to check if to refresh metadata.
Definition at line 128 of file RepoManager.cc.
Path where the metadata is downloaded and kept.
Given a repoinfo, tells where RepoManager will download and keep the raw metadata.
info | Repository information |
repo::RepoNoAliasException | if can't figure an alias |
Definition at line 134 of file RepoManager.cc.
Path where the rpm packages are downloaded and kept.
Given a repoinfo, tells where RepoProvidePackage will download and keep the .rpm files.
info | Repository information |
repo::RepoNoAliasException | if can't figure an alias |
Definition at line 137 of file RepoManager.cc.
void zypp::RepoManager::refreshMetadata | ( | const RepoInfo & | info, |
RawMetadataRefreshPolicy | policy = RefreshIfNeeded, | ||
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Refresh local raw cache.
Will try to download the metadata
In case of falure the metadata remains as it was before.
repo::RepoNoUrlException | if no urls are available. |
repo::RepoNoAliasException | if can't figure an alias |
repo::RepoUnknownTypeException | if the metadata is unknown |
repo::RepoNoPermissionException | if the user has no permission to update(write) the caches |
repo::RepoException | if the repository is invalid (no valid metadata found at any of baseurls) |
Definition at line 140 of file RepoManager.cc.
void zypp::RepoManager::cleanMetadata | ( | const RepoInfo & | info, |
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Clean local metadata.
Empty local metadata.
repo::RepoNoAliasException | if can't figure an alias |
Exception | on unknown error. |
Definition at line 147 of file RepoManager.cc.
void zypp::RepoManager::cleanPackages | ( | const RepoInfo & | info, |
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Clean local package cache.
Empty local directory with downloaded packages
repo::RepoNoAliasException | if can't figure an alias |
Exception | on unknown error. |
Definition at line 150 of file RepoManager.cc.
RepoStatus zypp::RepoManager::cacheStatus | ( | const RepoInfo & | info | ) | const |
Status of metadata cache.
Definition at line 153 of file RepoManager.cc.
void zypp::RepoManager::buildCache | ( | const RepoInfo & | info, |
CacheBuildPolicy | policy = BuildIfNeeded, | ||
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Refresh local cache.
Will try to build the cache from local metadata.
If the cache exists it will be overwriten.
repo::RepoNoAliasException | if can't figure an alias to look in cache |
repo::RepoMetadataException | if the metadata is not enough to build a cache (empty, incorrect, or refresh needed) |
repo::RepoNoPermissionException | if the user has no permission to update(write) the caches |
repo::RepoUnknownTypeException | |
parser::ParseException | if parser encounters an error. |
Exception | on unknown error. |
Definition at line 156 of file RepoManager.cc.
void zypp::RepoManager::cleanCache | ( | const RepoInfo & | info, |
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
clean local cache
Clean the cached version of the metadata
repo::RepoNoAliasException | if can't figure an alias to look in cache |
cache::CacheRecordNotFoundException | if the cache could not be cleaned because of repository record not found. |
Exception | on unknown error. |
Definition at line 163 of file RepoManager.cc.
Whether a repository exists in cache.
RepoInfo | to be checked. |
Definition at line 166 of file RepoManager.cc.
void zypp::RepoManager::loadFromCache | ( | const RepoInfo & | info, |
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Load resolvables into the pool.
Creating from cache requires that the repository is refreshed (metadata downloaded) and cached
repo::RepoNoAliasException | if can't figure an alias to look in cache |
RepoNotCachedException | When the source is not cached. |
Definition at line 169 of file RepoManager.cc.
void zypp::RepoManager::cleanCacheDirGarbage | ( | const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() | ) |
Remove any subdirectories of cache directories which no longer belong to any of known repositories.
These can be temporary directories left by interrupted refresh, or dirs left after changing .repo files outside of libzypp.
Definition at line 172 of file RepoManager.cc.
repo::RepoType zypp::RepoManager::probe | ( | const Url & | url, |
const Pathname & | path ) const |
Probe repo metadata type.
The location to probe consists of the base url (you may think of it as a mountpoint) and the path to the repository on the mounted media (ususally /
).
Definition at line 175 of file RepoManager.cc.
repo::RepoType zypp::RepoManager::probe | ( | const Url & | url | ) | const |
Definition at line 178 of file RepoManager.cc.
void zypp::RepoManager::addRepository | ( | const RepoInfo & | info, |
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Adds a repository to the list of known repositories.
repo::RepoAlreadyExistsException | If the repo clash some unique attribute like alias |
RepoUnknownType | If RepoManagerOptions::probe is true and repository type can't be determined. |
RepoException | If RepoManagerOptions::probe is true and access to the url fails. |
Exception | On other errors. |
Definition at line 195 of file RepoManager.cc.
void zypp::RepoManager::addRepository | ( | const RepoInfo & | info, |
const TriBool & | forcedProbe, | ||
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Definition at line 181 of file RepoManager.cc.
void zypp::RepoManager::addRepositories | ( | const Url & | url, |
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Adds repositores from a repo file to the list of known repositories.
url | Url of the repo file. The URL is subject to repo variable expansion. |
repo::RepoAlreadyExistsException | If the repo clash some unique attribute like alias |
MediaException | If the access to the url fails |
ParseException | If the file parsing fails |
RepoUnknownType | If repository type can't be determined |
RepoException | ON other repository related errors |
Exception | On other errors. |
Definition at line 198 of file RepoManager.cc.
void zypp::RepoManager::removeRepository | ( | const RepoInfo & | info, |
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Remove the best matching repository from known repos list.
RepoNotFoundException | If no repo match |
Definition at line 201 of file RepoManager.cc.
void zypp::RepoManager::modifyRepository | ( | const std::string & | alias, |
const RepoInfo & | newinfo, | ||
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Modify repository attributes.
RepoAlreadyExistsException | if the alias specified in newinfo is already used by another repository |
RepoNotFoundException | If no repo match |
ParseException | If the file parsing fails |
Exception | On other errors. |
Definition at line 208 of file RepoManager.cc.
|
inline |
Definition at line 422 of file RepoManager.h.
RepoInfo zypp::RepoManager::getRepositoryInfo | ( | const std::string & | alias, |
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Find a matching repository info.
alias | Repository alias |
progressrcv | Progress reporting function |
RepoNotFoundException | If no repo match the alias |
ParseException | If the file parsing fails |
Exception | On other errors. |
Definition at line 219 of file RepoManager.cc.
RepoInfo zypp::RepoManager::getRepositoryInfo | ( | const Url & | url, |
const url::ViewOption & | urlview = url::ViewOption::DEFAULTS, | ||
const ProgressData::ReceiverFnc & | progressrcv = ProgressData::ReceiverFnc() ) |
Find repository info by URL.
url | URL to find. |
urlview | url::ViewOption to influence URL matching. |
progressrcv | Progress receiver function. |
RepoNotFoundException | If no repo match |
ParseException | If the file parsing fails |
Exception | On other errors. |
Definition at line 222 of file RepoManager.cc.
bool zypp::RepoManager::serviceEmpty | ( | ) | const |
Gets true if no service is in RepoManager (so no one in specified location)
Definition at line 225 of file RepoManager.cc.
RepoManager::ServiceSizeType zypp::RepoManager::serviceSize | ( | ) | const |
Gets count of service in RepoManager (in specified location)
Definition at line 228 of file RepoManager.cc.
RepoManager::ServiceConstIterator zypp::RepoManager::serviceBegin | ( | ) | const |
Iterator to first service in internal storage.
Definition at line 231 of file RepoManager.cc.
RepoManager::ServiceConstIterator zypp::RepoManager::serviceEnd | ( | ) | const |
Iterator to place behind last service in internal storage.
Definition at line 234 of file RepoManager.cc.
|
inline |
Iterate the known services.
Definition at line 675 of file RepoManager.h.
|
inline |
List of known services.
Definition at line 504 of file RepoManager.h.
ServiceInfo zypp::RepoManager::getService | ( | const std::string & | alias | ) | const |
Finds ServiceInfo by alias or return ServiceInfo::noService.
alias | unique identifier of service |
Definition at line 237 of file RepoManager.cc.
bool zypp::RepoManager::hasService | ( | const std::string & | alias | ) | const |
Return whether there is a known service for alias
.
Definition at line 240 of file RepoManager.cc.
repo::ServiceType zypp::RepoManager::probeService | ( | const Url & | url | ) | const |
Probe the type or the service.
Definition at line 243 of file RepoManager.cc.
void zypp::RepoManager::addService | ( | const std::string & | alias, |
const Url & | url ) |
Adds a new service by its alias and URL.
alias | unique identifier of the service |
url | url to service |
FIXME | RepoAlreadyExistException and as reponame is service name |
Definition at line 246 of file RepoManager.cc.
void zypp::RepoManager::addService | ( | const ServiceInfo & | service | ) |
Adds new service.
service | service info |
FIXME | RepoAlreadyExistException and as reponame is service name |
Definition at line 249 of file RepoManager.cc.
void zypp::RepoManager::removeService | ( | const std::string & | alias | ) |
Removes service specified by its name.
alias | unique indientifier of the service to remove |
RepoException | if service is not found or file with ServiceInfo cannot be deleted |
Exception | if file contain more services and rewrite file failed |
Definition at line 252 of file RepoManager.cc.
void zypp::RepoManager::removeService | ( | const ServiceInfo & | service | ) |
Definition at line 255 of file RepoManager.cc.
void zypp::RepoManager::refreshServices | ( | const RefreshServiceOptions & | options_r = RefreshServiceOptions() | ) |
Refreshes all enabled services.
Definition at line 258 of file RepoManager.cc.
void zypp::RepoManager::refreshService | ( | const std::string & | alias, |
const RefreshServiceOptions & | options_r = RefreshServiceOptions() ) |
Refresh specific service.
alias | unique indientifier of the service to refresh |
RepoException | if service is not found. |
MediaException | If there's a problem downloading the repo index file. |
Definition at line 261 of file RepoManager.cc.
void zypp::RepoManager::refreshService | ( | const ServiceInfo & | service, |
const RefreshServiceOptions & | options_r = RefreshServiceOptions() ) |
Definition at line 264 of file RepoManager.cc.
void zypp::RepoManager::modifyService | ( | const std::string & | oldAlias, |
const ServiceInfo & | service ) |
Modifies service file (rewrites it with new values) and underlying repositories if needed.
Modifications of a service can lead to rewrite of all .repo files of contained repositories. Particularily, disabling a service (changing ServiceInfo::enabled() from true to false) will disable all contained repositories. Renaming of a service will modify the "service" key of all contained repositories.
oldAlias | Old alias of the service |
service | ServiceInfo object containing new data |
RepoException | if sservice with oldAlias is not known |
Exception | if have problems with files |
Definition at line 267 of file RepoManager.cc.
|
inline |
Definition at line 593 of file RepoManager.h.
void zypp::RepoManager::refreshGeoIp | ( | const RepoInfo::url_set & | urls | ) |
Checks for any of the given urls if there is no geoip data available, caches the results in the metadata cache for 24hrs. The given urls need to be configured as valid geoIP targets ( usually download.opensuse.org )
Definition at line 270 of file RepoManager.cc.
|
inline |
fill to output iterator repositories in service name.
This output iterator can perform any action on with Repo or service Container, because it is sets and it isn't dynamic recreate.
alias | service alias |
out | output iterator which get all the repositories belonging to specified service |
example how set priority for each RepoInfo in this service:
Definition at line 651 of file RepoManager.h.
|
friend |
Definition at line 275 of file RepoManager.cc.
|
Stream output.
Definition at line 275 of file RepoManager.cc.
|
staticconstexpr |
Definition at line 83 of file RepoManager.h.
|
staticconstexpr |
Definition at line 84 of file RepoManager.h.
|
staticconstexpr |
Definition at line 85 of file RepoManager.h.
|
staticconstexpr |
Definition at line 88 of file RepoManager.h.
|
staticconstexpr |
Definition at line 89 of file RepoManager.h.
|
staticconstexpr |
Definition at line 93 of file RepoManager.h.
|
staticconstexpr |
Definition at line 94 of file RepoManager.h.
|
staticconstexpr |
refresh is needed
Definition at line 142 of file RepoManager.h.
|
staticconstexpr |
repository not changed
Definition at line 143 of file RepoManager.h.
|
staticconstexpr |
refresh is delayed due to settings
Definition at line 144 of file RepoManager.h.
|
private |
Pointer to implementation.
Definition at line 663 of file RepoManager.h.