libzypp 17.31.23
|
creates and provides information about known sources. More...
#include <RepoManager.h>
Classes | |
struct | MatchServiceAlias |
Functor thats filter RepoInfo by service which it belongs to. More... | |
Public Types | |
enum | RawMetadataRefreshPolicy { RefreshIfNeeded , RefreshForced , RefreshIfNeededIgnoreDelay } |
enum | CacheBuildPolicy { BuildIfNeeded , BuildForced } |
enum | RefreshServiceBit { RefreshService_restoreStatus = (1<<0) , RefreshService_forceRefresh = (1<<1) } |
Flags for tuning RefreshService. More... | |
typedef std::set< ServiceInfo > | ServiceSet |
ServiceInfo typedefs. | |
typedef ServiceSet::const_iterator | ServiceConstIterator |
typedef ServiceSet::size_type | ServiceSizeType |
typedef std::set< RepoInfo > | RepoSet |
RepoInfo typedefs. | |
typedef RepoSet::const_iterator | RepoConstIterator |
typedef RepoSet::size_type | RepoSizeType |
typedef RefreshServiceFlags | RefreshServiceOptions |
Options tuning RefreshService. | |
Private Member Functions | |
void | saveService (ServiceInfo &service) const |
Pathname | generateNonExistingName (const Pathname &dir, const std::string &basefilename) const |
std::string | generateFilename (const RepoInfo &info) const |
std::string | generateFilename (const ServiceInfo &info) const |
void | setCacheStatus (const RepoInfo &info, const RepoStatus &status) |
void | touchIndexFile (const RepoInfo &info) |
template<typename OutputIterator > | |
void | getRepositoriesInService (const std::string &alias, OutputIterator out) const |
void | init_knownServices () |
void | init_knownRepositories () |
const RepoSet & | repos () const |
Iterate the known repositories. | |
RepoSet & | reposManip () |
Impl * | clone () const |
clone for RWCOW_pointer | |
Private Attributes | |
RepoManagerOptions | _options |
RepoSet | _reposX |
ServiceSet | _services |
DefaultIntegral< bool, false > | _reposDirty |
PluginRepoverification | _pluginRepoverification |
Friends | |
Impl * | rwcowClone (const Impl *rhs) |
std::ostream & | operator<< (std::ostream &str, const RepoManager &obj) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const RepoManager &obj) |
Stream output. | |
Related Functions inherited from Impl | |
std::ostream & | operator<< (std::ostream &str, const RepoManager::Impl &obj) |
Stream output. | |
Known repositories. | |
The known repositories are read from RepoManagerOptions::knownReposPath passed on the Ctor. Which defaults to ZYpp global settings. | |
enum | RefreshCheckStatus { REFRESH_NEEDED , REPO_UP_TO_DATE , REPO_CHECK_DELAYED } |
Possibly return state of checkIfRefreshMEtadata function. More... | |
bool | repoEmpty () const |
RepoSizeType | repoSize () const |
RepoConstIterator | repoBegin () const |
RepoConstIterator | repoEnd () const |
Iterable< RepoConstIterator > | repos () const |
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. | |
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 | 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 532 of file RepoManager.cc.
typedef std::set<ServiceInfo> zypp::RepoManager::ServiceSet |
ServiceInfo typedefs.
Definition at line 114 of file RepoManager.h.
typedef ServiceSet::const_iterator zypp::RepoManager::ServiceConstIterator |
Definition at line 115 of file RepoManager.h.
typedef ServiceSet::size_type zypp::RepoManager::ServiceSizeType |
Definition at line 116 of file RepoManager.h.
typedef std::set<RepoInfo> zypp::RepoManager::RepoSet |
RepoInfo typedefs.
Definition at line 119 of file RepoManager.h.
typedef RepoSet::const_iterator zypp::RepoManager::RepoConstIterator |
Definition at line 120 of file RepoManager.h.
typedef RepoSet::size_type zypp::RepoManager::RepoSizeType |
Definition at line 121 of file RepoManager.h.
typedef RefreshServiceFlags zypp::RepoManager::RefreshServiceOptions |
Options tuning RefreshService.
Definition at line 150 of file RepoManager.h.
Enumerator | |
---|---|
RefreshIfNeeded | |
RefreshForced | |
RefreshIfNeededIgnoreDelay |
Definition at line 128 of file RepoManager.h.
Enumerator | |
---|---|
BuildIfNeeded | |
BuildForced |
Definition at line 135 of file RepoManager.h.
Flags for tuning RefreshService.
Enumerator | |
---|---|
RefreshService_restoreStatus | Force restoring repo enabled/disabled status. |
RefreshService_forceRefresh | Force refresh even if TTL is not reached. |
Definition at line 142 of file RepoManager.h.
Possibly return state of checkIfRefreshMEtadata function.
Enumerator | |
---|---|
REFRESH_NEEDED | refresh is needed |
REPO_UP_TO_DATE | repository not changed |
REPO_CHECK_DELAYED | refresh is delayed due to settings |
Definition at line 196 of file RepoManager.h.
|
inline |
Definition at line 543 of file RepoManager.cc.
zypp::RepoManager::RepoManager | ( | const RepoManagerOptions & | options = RepoManagerOptions() | ) |
Definition at line 2709 of file RepoManager.cc.
zypp::RepoManager::~RepoManager | ( | ) |
Dtor.
Definition at line 2713 of file RepoManager.cc.
|
inline |
Definition at line 535 of file RepoManager.cc.
|
inline |
Definition at line 588 of file RepoManager.cc.
|
inline |
Definition at line 589 of file RepoManager.cc.
|
inline |
Definition at line 590 of file RepoManager.cc.
|
inline |
Definition at line 591 of file RepoManager.cc.
|
inline |
Definition at line 593 of file RepoManager.cc.
|
inline |
Definition at line 596 of file RepoManager.cc.
Definition at line 603 of file RepoManager.cc.
Definition at line 606 of file RepoManager.cc.
RepoStatus zypp::RepoManager::metadataStatus | ( | const RepoInfo & | info | ) | const |
Definition at line 2754 of file RepoManager.cc.
RepoManager::RefreshCheckStatus zypp::RepoManager::checkIfToRefreshMetadata | ( | const RepoInfo & | info, |
const Url & | url, | ||
RawMetadataRefreshPolicy | policy | ||
) |
Definition at line 2757 of file RepoManager.cc.
void zypp::RepoManager::refreshMetadata | ( | const RepoInfo & | info, |
RawMetadataRefreshPolicy | policy, | ||
OPT_PROGRESS | |||
) |
void zypp::RepoManager::cleanMetadata | ( | const RepoInfo & | info, |
OPT_PROGRESS | |||
) |
void zypp::RepoManager::cleanPackages | ( | const RepoInfo & | info, |
OPT_PROGRESS | , | ||
bool | isAutoClean = false |
||
) |
void zypp::RepoManager::buildCache | ( | const RepoInfo & | info, |
CacheBuildPolicy | policy, | ||
OPT_PROGRESS | |||
) |
repo::RepoType zypp::RepoManager::probe | ( | const Url & | url, |
const Pathname & | path = Pathname() |
||
) | const |
Definition at line 2793 of file RepoManager.cc.
repo::RepoType zypp::RepoManager::probeCache | ( | const Pathname & | path_r | ) | const |
void zypp::RepoManager::cleanCacheDirGarbage | ( | OPT_PROGRESS | ) |
void zypp::RepoManager::cleanCache | ( | const RepoInfo & | info, |
OPT_PROGRESS | |||
) |
Definition at line 628 of file RepoManager.cc.
|
inline |
Definition at line 631 of file RepoManager.cc.
void zypp::RepoManager::loadFromCache | ( | const RepoInfo & | info, |
OPT_PROGRESS | |||
) |
void zypp::RepoManager::addRepository | ( | const RepoInfo & | info, |
OPT_PROGRESS | |||
) |
void zypp::RepoManager::addRepositories | ( | const Url & | url, |
OPT_PROGRESS | |||
) |
void zypp::RepoManager::removeRepository | ( | const RepoInfo & | info, |
OPT_PROGRESS | |||
) |
void zypp::RepoManager::modifyRepository | ( | const std::string & | alias, |
const RepoInfo & | newinfo_r, | ||
OPT_PROGRESS | |||
) |
RepoInfo zypp::RepoManager::getRepositoryInfo | ( | const std::string & | alias, |
OPT_PROGRESS | |||
) |
RepoInfo zypp::RepoManager::getRepositoryInfo | ( | const Url & | url, |
const url::ViewOption & | urlview, | ||
OPT_PROGRESS | |||
) |
|
inline |
Definition at line 648 of file RepoManager.cc.
|
inline |
Definition at line 649 of file RepoManager.cc.
|
inline |
Definition at line 650 of file RepoManager.cc.
|
inline |
Definition at line 651 of file RepoManager.cc.
|
inline |
Definition at line 653 of file RepoManager.cc.
|
inline |
Definition at line 656 of file RepoManager.cc.
void zypp::RepoManager::addService | ( | const ServiceInfo & | service | ) |
Definition at line 2841 of file RepoManager.cc.
|
inline |
Definition at line 664 of file RepoManager.cc.
void zypp::RepoManager::removeService | ( | const std::string & | alias | ) |
Definition at line 2844 of file RepoManager.cc.
|
inline |
Definition at line 668 of file RepoManager.cc.
void zypp::RepoManager::refreshServices | ( | const RefreshServiceOptions & | options_r | ) |
Definition at line 2850 of file RepoManager.cc.
void zypp::RepoManager::refreshService | ( | const std::string & | alias, |
const RefreshServiceOptions & | options_r | ||
) |
Definition at line 2853 of file RepoManager.cc.
|
inline |
Definition at line 674 of file RepoManager.cc.
void zypp::RepoManager::modifyService | ( | const std::string & | oldAlias, |
const ServiceInfo & | newService | ||
) |
Definition at line 2859 of file RepoManager.cc.
repo::ServiceType zypp::RepoManager::probeService | ( | const Url & | url | ) | const |
Definition at line 2835 of file RepoManager.cc.
void zypp::RepoManager::refreshGeoIPData | ( | const RepoInfo::url_set & | urls | ) |
|
private |
|
private |
|
inlineprivate |
Definition at line 688 of file RepoManager.cc.
|
inlineprivate |
Definition at line 691 of file RepoManager.cc.
|
inlineprivate |
Definition at line 694 of file RepoManager.cc.
|
private |
|
inlineprivate |
Definition at line 704 of file RepoManager.cc.
|
private |
|
private |
|
inlineprivate |
Iterate the known repositories.
Definition at line 716 of file RepoManager.cc.
|
inlineprivate |
Definition at line 717 of file RepoManager.cc.
|
inlineprivate |
clone for RWCOW_pointer
Definition at line 731 of file RepoManager.cc.
zypp::RepoManager::ZYPP_DECLARE_FLAGS | ( | RefreshServiceFlags | , |
RefreshServiceBit | |||
) |
bool zypp::RepoManager::repoEmpty | ( | ) | const |
RepoSizeType zypp::RepoManager::repoSize | ( | ) | const |
RepoConstIterator zypp::RepoManager::repoBegin | ( | ) | const |
RepoConstIterator zypp::RepoManager::repoEnd | ( | ) | const |
Iterable< RepoConstIterator > zypp::RepoManager::repos | ( | ) | const |
|
inline |
List of known repositories.
Definition at line 167 of file RepoManager.h.
RepoInfo zypp::RepoManager::getRepo | ( | const std::string & | alias | ) | const |
Find RepoInfo by alias or return RepoInfo::noRepo.
Definition at line 173 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 179 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 2734 of file RepoManager.cc.
RepoStatus zypp::RepoManager::metadataStatus | ( | const RepoInfo & | info | ) | const |
Status of local metadata.
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 |
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 |
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 |
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::RepoException | if the repository is invalid (no valid metadata found at any of baseurls) |
Definition at line 2766 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 2769 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 2772 of file RepoManager.cc.
RepoStatus zypp::RepoManager::cacheStatus | ( | const RepoInfo & | info | ) | const |
Status of metadata cache.
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::RepoUnknownTypeException | |
parser::ParseException | if parser encounters an error. |
Exception | on unknown error. |
Definition at line 2778 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 2781 of file RepoManager.cc.
Whether a repository exists in cache.
RepoInfo | to be checked. |
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 2787 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 2790 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 /
).
repo::RepoType zypp::RepoManager::probe | ( | const Url & | url | ) | const |
Definition at line 2796 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 2799 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 |
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 2802 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 2805 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 2808 of file RepoManager.cc.
|
inline |
Definition at line 463 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 2811 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 2814 of file RepoManager.cc.
bool zypp::RepoManager::serviceEmpty | ( | ) | const |
Gets true if no service is in RepoManager (so no one in specified location)
ServiceSizeType zypp::RepoManager::serviceSize | ( | ) | const |
Gets count of service in RepoManager (in specified location)
ServiceConstIterator zypp::RepoManager::serviceBegin | ( | ) | const |
Iterator to first service in internal storage.
ServiceConstIterator zypp::RepoManager::serviceEnd | ( | ) | const |
Iterator to place behind last service in internal storage.
|
inline |
Iterate the known services.
Definition at line 717 of file RepoManager.h.
|
inline |
List of known services.
Definition at line 545 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 |
bool zypp::RepoManager::hasService | ( | const std::string & | alias | ) | const |
Return whether there is a known service for alias
.
repo::ServiceType zypp::RepoManager::probeService | ( | const Url & | url | ) | const |
Probe the type or the service.
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 |
void zypp::RepoManager::addService | ( | const ServiceInfo & | service | ) |
Adds new service.
service | service info |
FIXME | RepoAlreadyExistException and as reponame is service name |
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 |
void zypp::RepoManager::removeService | ( | const ServiceInfo & | service | ) |
void zypp::RepoManager::refreshServices | ( | const RefreshServiceOptions & | options_r = RefreshServiceOptions() | ) |
Refreshes all enabled services.
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. |
void zypp::RepoManager::refreshService | ( | const ServiceInfo & | service, |
const RefreshServiceOptions & | options_r = RefreshServiceOptions() |
||
) |
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 |
|
inline |
Definition at line 634 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 2862 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 692 of file RepoManager.h.
|
friend |
Definition at line 2867 of file RepoManager.cc.
|
related |
Stream output.
Definition at line 2867 of file RepoManager.cc.
|
private |
Definition at line 720 of file RepoManager.cc.
|
private |
Definition at line 721 of file RepoManager.cc.
|
private |
Definition at line 722 of file RepoManager.cc.
|
private |
Definition at line 724 of file RepoManager.cc.
|
private |
Definition at line 726 of file RepoManager.cc.
|
private |
Pointer to implementation.
Definition at line 704 of file RepoManager.h.