libzypp 17.37.10

zyppng::RepoManager< ZyppContextRefType > Class Template Reference

The RepoManager class Provides knowledge and methods to maintain repo settings and metadata for a given context. More...

`#include <zypp/ng/repomanager.h>`

Inheritance diagram for zyppng::RepoManager< ZyppContextRefType >:

## Classes
struct | MatchServiceAlias
| Functor thats filter RepoInfo by service which it belongs to. More...

## Public Types
using | ContextRefType = ZyppContextRefType
using | ContextType = typename ZyppContextRefType::element_type
using | RawMetadataRefreshPolicy = zypp::RepoManagerFlags::RawMetadataRefreshPolicy
using | CacheBuildPolicy = zypp::RepoManagerFlags::CacheBuildPolicy
using | RefreshCheckStatus = zypp::RepoManagerFlags::RefreshCheckStatus
using | RefreshServiceBit = zypp::RepoManagerFlags::RefreshServiceBit
| Flags for tuning RefreshService.
using | RefreshServiceOptions = zypp::RepoManagerFlags::RefreshServiceOptions
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
Public Types inherited from zyppng::Base
using | Ptr = std::shared_ptr<Base>
using | WeakPtr = std::weak_ptr<Base>

## Public Member Functions
| ZYPP_DECL_PRIVATE_CONSTR_ARGS (RepoManager, ZyppContextRefType zyppCtx, RepoManagerOptions opt)
virtual | ~RepoManager ()
expected< void > | initialize ()
ContextRefType | zyppContext () const
const RepoManagerOptions & | options () const
bool | repoEmpty () const
RepoSizeType | repoSize () const
RepoConstIterator | repoBegin () const
RepoConstIterator | repoEnd () const
bool | hasRepo (const std::string &alias) const
RepoInfo | getRepo (const std::string &alias) const
expected< zypp::Pathname > | metadataPath (const RepoInfo &info) const
expected< zypp::Pathname > | packagesPath (const RepoInfo &info) const
expected< RepoStatus > | metadataStatus (const RepoInfo &info) const
expected< void > | cleanMetadata (const RepoInfo &info, ProgressObserverRef myProgress=nullptr)
expected< void > | cleanPackages (const RepoInfo &info, ProgressObserverRef myProgress=nullptr, bool isAutoClean=false)
expected< void > | cleanCacheDirGarbage (ProgressObserverRef myProgress=nullptr)
expected< void > | cleanCache (const RepoInfo &info, ProgressObserverRef myProgress=nullptr)
expected< bool > | isCached (const RepoInfo &info) const
expected< RepoStatus > | cacheStatus (const RepoInfo &info) const
expected< void > | loadFromCache (const RepoInfo &info, ProgressObserverRef myProgress=nullptr)
expected< RepoInfo > | addProbedRepository (RepoInfo info, zypp::repo::RepoType probedType)
expected< void > | removeRepository (const RepoInfo &info, ProgressObserverRef myProgress=nullptr)
expected< RepoInfo > | modifyRepository (const std::string &alias, const RepoInfo &newinfo_r, ProgressObserverRef myProgress=nullptr)
expected< RepoInfo > | getRepositoryInfo (const std::string &alias)
expected< RepoInfo > | getRepositoryInfo (const zypp::Url &url, const zypp::url::ViewOption &urlview)
expected< RefreshCheckStatus > | checkIfToRefreshMetadata (const RepoInfo &info, const zypp::MirroredOrigin &origin, RawMetadataRefreshPolicy policy)
expected< RefreshCheckStatus > | checkIfToRefreshMetadata (const RepoInfo &info, const zypp::Url &url, RawMetadataRefreshPolicy policy)
expected< void > | refreshMetadata (const RepoInfo &info, RawMetadataRefreshPolicy policy, ProgressObserverRef myProgress=nullptr)
| Refresh local raw cache.
std::vector< std::pair< RepoInfo, expected< void > > > | refreshMetadata (std::vector< RepoInfo > infos, RawMetadataRefreshPolicy policy, ProgressObserverRef myProgress=nullptr)
expected< zypp::repo::RepoType > | probe (const zypp::MirroredOrigin &origin, const zypp::Pathname &path=zypp::Pathname()) const
| Probe the metadata type of a repository located at `url`.
expected< void > | buildCache (const RepoInfo &info, CacheBuildPolicy policy, ProgressObserverRef myProgress=nullptr)
expected< RepoInfo > | addRepository (const RepoInfo &info, ProgressObserverRef myProgress=nullptr)
expected< void > | addRepositories (const zypp::Url &url, ProgressObserverRef myProgress=nullptr)
bool | serviceEmpty () const
ServiceSizeType | serviceSize () const
ServiceConstIterator | serviceBegin () const
ServiceConstIterator | serviceEnd () const
bool | hasService (const std::string &alias) const
ServiceInfo | getService (const std::string &alias) const
expected< zypp::repo::ServiceType > | probeService (const zypp::Url &url) const
expected< void > | addService (const ServiceInfo &service)
expected< void > | addService (const std::string &alias, const zypp::Url &url)
expected< void > | removeService (const std::string &alias)
expected< void > | removeService (const ServiceInfo &service)
expected< void > | refreshService (const std::string &alias, const RefreshServiceOptions &options_r)
expected< void > | refreshService (const ServiceInfo &service, const RefreshServiceOptions &options_r)
expected< void > | refreshServices (const RefreshServiceOptions &options_r)
expected< void > | modifyService (const std::string &oldAlias, const ServiceInfo &newService)
expected< void > | setCacheStatus (const RepoInfo &info, const RepoStatus &status)
expected< void > | refreshGeoIp (const RepoInfo::url_set &urls)
template<typename OutputIterator>
void | getRepositoriesInService (const std::string &alias, OutputIterator out) const
zypp::Pathname | generateNonExistingName (const zypp::Pathname &dir, const std::string &basefilename) const
| Generate a non existing filename in a directory, using a base name.
std::string | generateFilename (const RepoInfo &info) const
std::string | generateFilename (const ServiceInfo &info) const
const RepoSet & | repos () const
RepoSet & | reposManip ()
PluginRepoverification | pluginRepoverification () const
Public Member Functions inherited from zyppng::Base
| Base ()
virtual | ~Base ()
WeakPtr | parent () const
void | addChild (const Base::Ptr &child)
void | removeChild (const Ptr &child)
const std::unordered_set< Ptr > & | children () const
std::thread::id | threadId () const
template<typename T>
std::vector< std::weak_ptr< T > > | findChildren () const
template<typename T>
std::shared_ptr< T > | shared_this () const
template<typename T>
std::shared_ptr< T > | shared_this ()
template<typename T>
std::weak_ptr< T > | weak_this () const
template<typename T>
std::weak_ptr< T > | weak_this ()
template<typename SenderFunc, typename ReceiverFunc>
auto | connect (SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc)
template<typename SenderFunc, typename ReceiverFunc, typename ... Tracker>
std::enable_if_t< std::is_member_function_pointer_v< SenderFunc >, connection > | connectFunc (SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers)

## Static Public Member Functions
template<typename ... Args>
static expected< std::shared_ptr< RepoManager< ZyppContextRefType > > > | create (Args &&...args)
static expected< RepoStatus > | metadataStatus (const RepoInfo &info, const RepoManagerOptions &options)
static zypp::repo::RepoType | probeCache (const zypp::Pathname &path_r)
| Probe Metadata in a local cache directory.
static expected< RepoStatus > | cacheStatus (const RepoInfo &info, const RepoManagerOptions &options)
static expected< void > | touchIndexFile (const RepoInfo &info, const RepoManagerOptions &options)
Static Public Member Functions inherited from zyppng::Base
template<typename Obj, typename Functor>
static decltype(auto) | make_base_slot (Obj *o, Functor &&f)
template<typename SenderFunc, typename ReceiverFunc>
static auto | connect (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc)
template<typename SenderFunc, typename ReceiverFunc, typename ... Tracker>
static auto | connectFunc (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers)

## Protected Member Functions
expected< void > | saveService (ServiceInfo &service) const
expected< void > | touchIndexFile (const RepoInfo &info)
expected< void > | init_knownServices ()
expected< void > | init_knownRepositories ()
Protected Member Functions inherited from zyppng::Base
| Base (BasePrivate &dd)

## Protected Attributes
ContextRefType | _zyppContext
RepoManagerOptions | _options
RepoSet | _reposX
ServiceSet | _services
PluginRepoverification | _pluginRepoverification
zypp::DefaultIntegral< bool, false > | _reposDirty
Protected Attributes inherited from zyppng::Base
std::unique_ptr< BasePrivate > | d_ptr

## Private Member Functions
| ZYPP_ADD_PRIVATE_CONSTR_HELPER ()
| ZYPP_ENABLE_MAYBE_ASYNC_MIXIN ((std::is_same_v< ZyppContextRefType, ContextRef >))
Private Member Functions inherited from zyppng::MaybeAsyncMixin< std::is_same_v< ZyppContextRefType, ContextRef > >
auto | makeReadyResult (T &&res)

## Additional Inherited Members
Private Types inherited from zyppng::MaybeAsyncMixin< std::is_same_v< ZyppContextRefType, ContextRef > >
using | MaybeAsyncRef
Static Private Attributes inherited from zyppng::MaybeAsyncMixin< std::is_same_v< ZyppContextRefType, ContextRef > >
static constexpr bool | is_async

## Detailed Description

template<typename ZyppContextRefType>
class zyppng::RepoManager< ZyppContextRefType >

The RepoManager class Provides knowledge and methods to maintain repo settings and metadata for a given context.

Depending on the ZyppContextRefType the convenienve functions execute the workflows in a sync or async way. In sync mode libzypp's legacy reports are executed. Otherwise progress report is only provided via the ProgressObserver classes.

Definition at line 247 of file repomanager.h.

## Member Typedef Documentation

## ◆ ContextRefType

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::ContextRefType = ZyppContextRefType

Definition at line 254 of file repomanager.h.

## ◆ ContextType

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::ContextType = typename ZyppContextRefType::element_type

Definition at line 255 of file repomanager.h.

## ◆ RawMetadataRefreshPolicy

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::RawMetadataRefreshPolicy = zypp::RepoManagerFlags::RawMetadataRefreshPolicy

Definition at line 257 of file repomanager.h.

## ◆ CacheBuildPolicy

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::CacheBuildPolicy = zypp::RepoManagerFlags::CacheBuildPolicy

Definition at line 258 of file repomanager.h.

## ◆ RefreshCheckStatus

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::RefreshCheckStatus = zypp::RepoManagerFlags::RefreshCheckStatus

Definition at line 261 of file repomanager.h.

## ◆ RefreshServiceBit

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::RefreshServiceBit = zypp::RepoManagerFlags::RefreshServiceBit

Flags for tuning RefreshService.

Definition at line 264 of file repomanager.h.

## ◆ RefreshServiceOptions

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::RefreshServiceOptions = zypp::RepoManagerFlags::RefreshServiceOptions

Definition at line 265 of file repomanager.h.

## ◆ ServiceSet

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::ServiceSet = std::set<ServiceInfo>

ServiceInfo typedefs.

Definition at line 293 of file repomanager.h.

## ◆ ServiceConstIterator

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::ServiceConstIterator = ServiceSet::const_iterator

Definition at line 294 of file repomanager.h.

## ◆ ServiceSizeType

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::ServiceSizeType = ServiceSet::size_type

Definition at line 295 of file repomanager.h.

## ◆ RepoSet

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::RepoSet = std::set<RepoInfo>

RepoInfo typedefs.

Definition at line 298 of file repomanager.h.

## ◆ RepoConstIterator

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::RepoConstIterator = RepoSet::const_iterator

Definition at line 299 of file repomanager.h.

## ◆ RepoSizeType

template<typename ZyppContextRefType>

using zyppng::RepoManager< ZyppContextRefType >::RepoSizeType = RepoSet::size_type

Definition at line 300 of file repomanager.h.

## Constructor & Destructor Documentation

## ◆ ~RepoManager()

template<typename ZyppContextRefType>

zyppng::RepoManager< ZyppContextRefType >::~RepoManager | ( |  | ) |
| virtual

Definition at line 249 of file repomanager.cc.

## Member Function Documentation

## ◆ ZYPP_ADD_PRIVATE_CONSTR_HELPER()

template<typename ZyppContextRefType>

zyppng::RepoManager< ZyppContextRefType >::ZYPP_ADD_PRIVATE_CONSTR_HELPER | ( |  | ) |
| private

## ◆ ZYPP_ENABLE_MAYBE_ASYNC_MIXIN()

template<typename ZyppContextRefType>

zyppng::RepoManager< ZyppContextRefType >::ZYPP_ENABLE_MAYBE_ASYNC_MIXIN | ( | (std::is_same_v< ZyppContextRefType, ContextRef >) |  | ) |
| private

## ◆ ZYPP_DECL_PRIVATE_CONSTR_ARGS()

template<typename ZyppContextRefType>

zyppng::RepoManager< ZyppContextRefType >::ZYPP_DECL_PRIVATE_CONSTR_ARGS | ( | RepoManager< ZyppContextRefType > | ,
|  | ZyppContextRefType | zyppCtx,
|  | RepoManagerOptions | opt )

## ◆ create()

template<typename ZyppContextRefType>
template<typename ... Args>

expected< std::shared_ptr< RepoManager< ZyppContextRefType > > > zyppng::RepoManager< ZyppContextRefType >::create | ( | Args &&... | args | ) |
| inline static

Definition at line 271 of file repomanager.h.

## ◆ initialize()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::initialize | ( |  | ) |

Definition at line 294 of file repomanager.cc.

## ◆ zyppContext()

template<typename ZyppContextRefType>

ContextRefType zyppng::RepoManager< ZyppContextRefType >::zyppContext | ( |  | ) | const
| inline

Definition at line 309 of file repomanager.h.

## ◆ options()

template<typename ZyppContextRefType>

const RepoManagerOptions & zyppng::RepoManager< ZyppContextRefType >::options | ( |  | ) | const

Definition at line 303 of file repomanager.cc.

## ◆ repoEmpty()

template<typename ZyppContextRefType>

bool zyppng::RepoManager< ZyppContextRefType >::repoEmpty | ( |  | ) | const
| inline

Definition at line 315 of file repomanager.h.

## ◆ repoSize()

template<typename ZyppContextRefType>

RepoSizeType zyppng::RepoManager< ZyppContextRefType >::repoSize | ( |  | ) | const
| inline

Definition at line 316 of file repomanager.h.

## ◆ repoBegin()

template<typename ZyppContextRefType>

RepoConstIterator zyppng::RepoManager< ZyppContextRefType >::repoBegin | ( |  | ) | const
| inline

Definition at line 317 of file repomanager.h.

## ◆ repoEnd()

template<typename ZyppContextRefType>

RepoConstIterator zyppng::RepoManager< ZyppContextRefType >::repoEnd | ( |  | ) | const
| inline

Definition at line 318 of file repomanager.h.

## ◆ hasRepo()

template<typename ZyppContextRefType>

bool zyppng::RepoManager< ZyppContextRefType >::hasRepo | ( | const std::string & | alias | ) | const
| inline

Definition at line 320 of file repomanager.h.

## ◆ getRepo()

template<typename ZyppContextRefType>

RepoInfo zyppng::RepoManager< ZyppContextRefType >::getRepo | ( | const std::string & | alias | ) | const
| inline

Definition at line 323 of file repomanager.h.

## ◆ metadataPath()

template<typename ZyppContextRefType>

expected< zypp::Pathname > zyppng::RepoManager< ZyppContextRefType >::metadataPath | ( | const RepoInfo & | info | ) | const
| inline

Definition at line 330 of file repomanager.h.

## ◆ packagesPath()

template<typename ZyppContextRefType>

expected< zypp::Pathname > zyppng::RepoManager< ZyppContextRefType >::packagesPath | ( | const RepoInfo & | info | ) | const
| inline

Definition at line 333 of file repomanager.h.

## ◆ metadataStatus() [1/2]

template<typename ZyppContextRefType>

expected< RepoStatus > zyppng::RepoManager< ZyppContextRefType >::metadataStatus | ( | const RepoInfo & | info,
|  | const RepoManagerOptions & | options )
| static

Definition at line 309 of file repomanager.cc.

## ◆ metadataStatus() [2/2]

template<typename ZyppContextRefType>

expected< RepoStatus > zyppng::RepoManager< ZyppContextRefType >::metadataStatus | ( | const RepoInfo & | info | ) | const

Definition at line 373 of file repomanager.cc.

## ◆ cleanMetadata()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::cleanMetadata | ( | const RepoInfo & | info,
|  | ProgressObserverRef | myProgress = nullptr )

Definition at line 379 of file repomanager.cc.

## ◆ cleanPackages()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::cleanPackages | ( | const RepoInfo & | info,
|  | ProgressObserverRef | myProgress = nullptr,
|  | bool | isAutoClean = false )

Definition at line 398 of file repomanager.cc.

## ◆ probeCache()

template<typename ZyppContextRefType>

zypp::repo::RepoType zyppng::RepoManager< ZyppContextRefType >::probeCache | ( | const zypp::Pathname & | path_r | ) |
| static

Probe Metadata in a local cache directory.

Note
  Metadata in local cache directories must not be probed using probe as a cache path must not be rewritten (bnc#946129)

Definition at line 425 of file repomanager.cc.

## ◆ cleanCacheDirGarbage()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::cleanCacheDirGarbage | ( | ProgressObserverRef | myProgress = nullptr | ) |

Definition at line 443 of file repomanager.cc.

## ◆ cleanCache()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::cleanCache | ( | const RepoInfo & | info,
|  | ProgressObserverRef | myProgress = nullptr )

Definition at line 500 of file repomanager.cc.

## ◆ isCached()

template<typename ZyppContextRefType>

expected< bool > zyppng::RepoManager< ZyppContextRefType >::isCached | ( | const RepoInfo & | info | ) | const
| inline

Definition at line 349 of file repomanager.h.

## ◆ cacheStatus() [1/2]

template<typename ZyppContextRefType>

expected< RepoStatus > zyppng::RepoManager< ZyppContextRefType >::cacheStatus | ( | const RepoInfo & | info | ) | const
| inline

Definition at line 356 of file repomanager.h.

## ◆ cacheStatus() [2/2]

template<typename ZyppContextRefType>

expected< RepoStatus > zyppng::RepoManager< ZyppContextRefType >::cacheStatus | ( | const RepoInfo & | info,
|  | const RepoManagerOptions & | options )
| inline static

Definition at line 359 of file repomanager.h.

## ◆ loadFromCache()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::loadFromCache | ( | const RepoInfo & | info,
|  | ProgressObserverRef | myProgress = nullptr )

Definition at line 520 of file repomanager.cc.

## ◆ addProbedRepository()

template<typename ZyppContextRefType>

expected< RepoInfo > zyppng::RepoManager< ZyppContextRefType >::addProbedRepository | ( | RepoInfo | info,
|  | zypp::repo::RepoType | probedType )

Definition at line 572 of file repomanager.cc.

## ◆ removeRepository()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::removeRepository | ( | const RepoInfo & | info,
|  | ProgressObserverRef | myProgress = nullptr )

Definition at line 612 of file repomanager.cc.

## ◆ modifyRepository()

template<typename ZyppContextRefType>

expected< RepoInfo > zyppng::RepoManager< ZyppContextRefType >::modifyRepository | ( | const std::string & | alias,
|  | const RepoInfo & | newinfo_r,
|  | ProgressObserverRef | myProgress = nullptr )

Definition at line 701 of file repomanager.cc.

## ◆ getRepositoryInfo() [1/2]

template<typename ZyppContextRefType>

expected< RepoInfo > zyppng::RepoManager< ZyppContextRefType >::getRepositoryInfo | ( | const std::string & | alias | ) |

Definition at line 790 of file repomanager.cc.

## ◆ getRepositoryInfo() [2/2]

template<typename ZyppContextRefType>

expected< RepoInfo > zyppng::RepoManager< ZyppContextRefType >::getRepositoryInfo | ( | const zypp::Url & | url,
|  | const zypp::url::ViewOption & | urlview )

Definition at line 806 of file repomanager.cc.

## ◆ checkIfToRefreshMetadata() [1/2]

template<typename ZyppContextRefType>

expected< typename RepoManager< ZyppContextRefType >::RefreshCheckStatus > zyppng::RepoManager< ZyppContextRefType >::checkIfToRefreshMetadata | ( | const RepoInfo & | info,
|  | const zypp::MirroredOrigin & | origin,
|  | RawMetadataRefreshPolicy | policy )

Definition at line 828 of file repomanager.cc.

## ◆ checkIfToRefreshMetadata() [2/2]

template<typename ZyppContextRefType>

expected< RefreshCheckStatus > zyppng::RepoManager< ZyppContextRefType >::checkIfToRefreshMetadata | ( | const RepoInfo & | info,
|  | const zypp::Url & | url,
|  | RawMetadataRefreshPolicy | policy )
| inline

Definition at line 381 of file repomanager.h.

## ◆ refreshMetadata() [1/2]

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::refreshMetadata | ( | const RepoInfo & | info,
|  | RawMetadataRefreshPolicy | policy,
|  | ProgressObserverRef | myProgress = nullptr )

Refresh local raw cache.

Will try to download the metadata

In case of failure the metadata remains as it was before.

The returned expected can contain one of the following errors: 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)

Todo
  Currently no progress is generated, especially for the async code We might need to change this

Definition at line 844 of file repomanager.cc.

## ◆ refreshMetadata() [2/2]

template<typename ZyppContextRefType>

std::vector< std::pair< RepoInfo, expected< void > > > zyppng::RepoManager< ZyppContextRefType >::refreshMetadata | ( | std::vector< RepoInfo > | infos,
|  | RawMetadataRefreshPolicy | policy,
|  | ProgressObserverRef | myProgress = nullptr )

Definition at line 889 of file repomanager.cc.

## ◆ probe()

template<typename ZyppContextRefType>

expected< zypp::repo::RepoType > zyppng::RepoManager< ZyppContextRefType >::probe | ( | const zypp::MirroredOrigin & | origin,
|  | const zypp::Pathname & | path = zypp::Pathname() ) const

Probe the metadata type of a repository located at `url`.

Urls here may be rewritten by MediaSetAccess or zyppng::Provide to reflect the correct media number.

Note
  Metadata in local cache directories must be probed using probeCache as a cache path must not be rewritten (bnc#946129)

Definition at line 965 of file repomanager.cc.

## ◆ buildCache()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::buildCache | ( | const RepoInfo & | info,
|  | CacheBuildPolicy | policy,
|  | ProgressObserverRef | myProgress = nullptr )

Definition at line 981 of file repomanager.cc.

## ◆ addRepository()

template<typename ZyppContextRefType>

expected< RepoInfo > zyppng::RepoManager< ZyppContextRefType >::addRepository | ( | const RepoInfo & | info,
|  | ProgressObserverRef | myProgress = nullptr )

Adds the repository in info and returns the updated RepoInfo object.

Definition at line 994 of file repomanager.cc.

## ◆ addRepositories()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::addRepositories | ( | const zypp::Url & | url,
|  | ProgressObserverRef | myProgress = nullptr )

Definition at line 1000 of file repomanager.cc.

## ◆ serviceEmpty()

template<typename ZyppContextRefType>

bool zyppng::RepoManager< ZyppContextRefType >::serviceEmpty | ( |  | ) | const
| inline

Definition at line 418 of file repomanager.h.

## ◆ serviceSize()

template<typename ZyppContextRefType>

ServiceSizeType zyppng::RepoManager< ZyppContextRefType >::serviceSize | ( |  | ) | const
| inline

Definition at line 419 of file repomanager.h.

## ◆ serviceBegin()

template<typename ZyppContextRefType>

ServiceConstIterator zyppng::RepoManager< ZyppContextRefType >::serviceBegin | ( |  | ) | const
| inline

Definition at line 420 of file repomanager.h.

## ◆ serviceEnd()

template<typename ZyppContextRefType>

ServiceConstIterator zyppng::RepoManager< ZyppContextRefType >::serviceEnd | ( |  | ) | const
| inline

Definition at line 421 of file repomanager.h.

## ◆ hasService()

template<typename ZyppContextRefType>

bool zyppng::RepoManager< ZyppContextRefType >::hasService | ( | const std::string & | alias | ) | const
| inline

Definition at line 423 of file repomanager.h.

## ◆ getService()

template<typename ZyppContextRefType>

ServiceInfo zyppng::RepoManager< ZyppContextRefType >::getService | ( | const std::string & | alias | ) | const
| inline

Definition at line 426 of file repomanager.h.

## ◆ probeService()

template<typename ZyppContextRefType>

expected< zypp::repo::ServiceType > zyppng::RepoManager< ZyppContextRefType >::probeService | ( | const zypp::Url & | url | ) | const

Definition at line 1007 of file repomanager.cc.

## ◆ addService() [1/2]

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::addService | ( | const ServiceInfo & | service | ) |

Definition at line 1013 of file repomanager.cc.

## ◆ addService() [2/2]

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::addService | ( | const std::string & | alias,
|  | const zypp::Url & | url )
| inline

Definition at line 437 of file repomanager.h.

## ◆ removeService() [1/2]

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::removeService | ( | const std::string & | alias | ) |

Definition at line 1073 of file repomanager.cc.

## ◆ removeService() [2/2]

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::removeService | ( | const ServiceInfo & | service | ) |
| inline

Definition at line 441 of file repomanager.h.

## ◆ refreshService() [1/2]

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::refreshService | ( | const std::string & | alias,
|  | const RefreshServiceOptions & | options_r )

Definition at line 1042 of file repomanager.cc.

## ◆ refreshService() [2/2]

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::refreshService | ( | const ServiceInfo & | service,
|  | const RefreshServiceOptions & | options_r )
| inline

Definition at line 445 of file repomanager.h.

## ◆ refreshServices()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::refreshServices | ( | const RefreshServiceOptions & | options_r | ) |

Todo
  ignore ServicePluginInformalException in calling code

Definition at line 1051 of file repomanager.cc.

## ◆ modifyService()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::modifyService | ( | const std::string & | oldAlias,
|  | const ServiceInfo & | newService )

Todo
  refresh the service automatically if url is changed?

Definition at line 1135 of file repomanager.cc.

## ◆ touchIndexFile() [1/2]

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::touchIndexFile | ( | const RepoInfo & | info,
|  | const RepoManagerOptions & | options )
| static

Definition at line 1275 of file repomanager.cc.

## ◆ setCacheStatus()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::setCacheStatus | ( | const RepoInfo & | info,
|  | const RepoStatus & | status )
| inline

Definition at line 454 of file repomanager.h.

## ◆ refreshGeoIp()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::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 1317 of file repomanager.cc.

## ◆ getRepositoriesInService()

template<typename ZyppContextRefType>
template<typename OutputIterator>

void zyppng::RepoManager< ZyppContextRefType >::getRepositoriesInService | ( | const std::string & | alias,
|  | OutputIterator | out ) const
| inline

Definition at line 476 of file repomanager.h.

## ◆ generateNonExistingName()

template<typename ZyppContextRefType>

zypp::Pathname zyppng::RepoManager< ZyppContextRefType >::generateNonExistingName | ( | const zypp::Pathname & | dir,
|  | const std::string & | basefilename ) const

Generate a non existing filename in a directory, using a base name.

For example if a directory contains 3 files

|– bar |– foo `– moo

If you try to generate a unique filename for this directory, based on "ruu" you will get "ruu", but if you use the base "foo" you will get "foo_1"

Parameters

  dir | Directory where the file needs to be unique
  basefilename | string to base the filename on.

Definition at line 1261 of file repomanager.cc.

## ◆ generateFilename() [1/2]

template<typename ZyppContextRefType>

std::string zyppng::RepoManager< ZyppContextRefType >::generateFilename | ( | const RepoInfo & | info | ) | const
| inline

Definition at line 486 of file repomanager.h.

## ◆ generateFilename() [2/2]

template<typename ZyppContextRefType>

std::string zyppng::RepoManager< ZyppContextRefType >::generateFilename | ( | const ServiceInfo & | info | ) | const
| inline

Definition at line 489 of file repomanager.h.

## ◆ saveService()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::saveService | ( | ServiceInfo & | service | ) | const
| protected

Definition at line 1218 of file repomanager.cc.

## ◆ touchIndexFile() [2/2]

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::touchIndexFile | ( | const RepoInfo & | info | ) |
| protected

Definition at line 1323 of file repomanager.cc.

## ◆ init_knownServices()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::init_knownServices | ( |  | ) |
| protected

Definition at line 1329 of file repomanager.cc.

## ◆ init_knownRepositories()

template<typename ZyppContextRefType>

expected< void > zyppng::RepoManager< ZyppContextRefType >::init_knownRepositories | ( |  | ) |
| protected

Definition at line 1403 of file repomanager.cc.

## ◆ repos()

template<typename ZyppContextRefType>

const RepoSet & zyppng::RepoManager< ZyppContextRefType >::repos | ( |  | ) | const
| inline

Definition at line 502 of file repomanager.h.

## ◆ reposManip()

template<typename ZyppContextRefType>

RepoSet & zyppng::RepoManager< ZyppContextRefType >::reposManip | ( |  | ) |
| inline

Definition at line 503 of file repomanager.h.

## ◆ pluginRepoverification()

template<typename ZyppContextRefType>

PluginRepoverification zyppng::RepoManager< ZyppContextRefType >::pluginRepoverification | ( |  | ) | const
| inline

Definition at line 506 of file repomanager.h.

## Member Data Documentation

## ◆ _zyppContext

template<typename ZyppContextRefType>

ContextRefType zyppng::RepoManager< ZyppContextRefType >::_zyppContext
| protected

Definition at line 510 of file repomanager.h.

## ◆ _options

template<typename ZyppContextRefType>

RepoManagerOptions zyppng::RepoManager< ZyppContextRefType >::_options
| protected

Definition at line 511 of file repomanager.h.

## ◆ _reposX

template<typename ZyppContextRefType>

RepoSet zyppng::RepoManager< ZyppContextRefType >::_reposX
| protected

Definition at line 512 of file repomanager.h.

## ◆ _services

template<typename ZyppContextRefType>

ServiceSet zyppng::RepoManager< ZyppContextRefType >::_services
| protected

Definition at line 513 of file repomanager.h.

## ◆ _pluginRepoverification

template<typename ZyppContextRefType>

PluginRepoverification zyppng::RepoManager< ZyppContextRefType >::_pluginRepoverification
| protected

Definition at line 514 of file repomanager.h.

## ◆ _reposDirty

template<typename ZyppContextRefType>

zypp::DefaultIntegral<bool,false> zyppng::RepoManager< ZyppContextRefType >::_reposDirty
| protected

Definition at line 515 of file repomanager.h.

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

- zypp/ng/repomanager.h
- zypp/ng/repomanager.cc