libzypp 17.37.10

RepoManager.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12
13#include <iostream>
14#include <zypp-core/Digest.h>
15#include <zypp-core/zyppng/pipelines/Lift>
16#include <zypp/ng/progressobserveradaptor.h>
17#include <zypp/ng/workflows/contextfacade.h>
18#include <zypp/ng/repo/refresh.h>
19#include <zypp/ng/repo/workflows/repomanagerwf.h>
20
21#undef ZYPP_BASE_LOGGER_LOGGROUP
22#define ZYPP_BASE_LOGGER_LOGGROUP "zypp::repomanager"
23
24 using std::endl;
25 using std::string;
26 using namespace zypp::repo;
27
28#define OPT_PROGRESS const ProgressData::ReceiverFnc & = ProgressData::ReceiverFnc()
29
31 namespace zypp
32{
38 struct ZYPP_LOCAL RepoManager::Impl
39 {
40 public:
41 Impl( zyppng::SyncContextRef &&ctx, RepoManagerOptions &&opt) {
42 _ngMgr = zyppng::SyncRepoManager::create( std::move(ctx), std::move(opt) ).unwrap();
43 }
44
45 Impl(const Impl &) = delete;
46 Impl(Impl &&) = delete;
47 Impl &operator=(const Impl &) = delete;
48 Impl &operator=(Impl &&) = delete;
49
50 public:
51 const zyppng::SyncRepoManager &ngMgr() const {
52 return *_ngMgr;
53 }
54
55 zyppng::SyncRepoManager &ngMgr() {
56 return *_ngMgr;
57 }
58
59 private:
60 zyppng::SyncRepoManagerRef _ngMgr;
61
62 private:
63 friend Impl * rwcowClone<Impl>( const Impl * rhs );
65 Impl * clone() const
66 { return new Impl( zyppng::SyncContextRef(_ngMgr->zyppContext()), RepoManagerOptions(_ngMgr->options()) ); }
67 };
68
69
71 inline std::ostream & operator<<( std::ostream & str, const RepoManager::Impl & obj )
72 { return str << "RepoManager::Impl"; }
73
75 //
76 // CLASS NAME : RepoManager
77 //
79
80 RepoManager::RepoManager( RepoManagerOptions opt )
81 : _pimpl( new Impl( zyppng::SyncContext::defaultContext(), std::move(opt)) )
82 {}
83
84 RepoManager::~RepoManager()
85 {}
86
87 bool RepoManager::repoEmpty() const
88 { return _pimpl->ngMgr().repoEmpty(); }
89
90 RepoManager::RepoSizeType RepoManager::repoSize() const
91 { return _pimpl->ngMgr().repoSize(); }
92
93 RepoManager::RepoConstIterator RepoManager::repoBegin() const
94 { return _pimpl->ngMgr().repoBegin(); }
95
96 RepoManager::RepoConstIterator RepoManager::repoEnd() const
97 { return _pimpl->ngMgr().repoEnd(); }
98
99 RepoInfo RepoManager::getRepo( const std::string & alias ) const
100 { return _pimpl->ngMgr().getRepo( alias ); }
101
102 bool RepoManager::hasRepo( const std::string & alias ) const
103 { return _pimpl->ngMgr().hasRepo( alias ); }
104
105 std::string RepoManager::makeStupidAlias( const Url & url_r )
106 {
107 std::string ret( url_r.getScheme() );
108 if ( ret.empty() )
109 ret = "repo-";
110 else
111 ret += "-";
112
113 std::string host( url_r.getHost() );
114 if ( ! host.empty() )
115 {
116 ret += host;
117 ret += "-";
118 }
119
120 static Date::ValueType serial = Date::now();
121 ret += Digest::digest( Digest::sha1(), str::hexstring( ++serial ) +url_r.asCompleteString() ).substr(0,8);
122 return ret;
123 }
124
125 RepoStatus RepoManager::metadataStatus( const RepoInfo & info ) const
126 { return _pimpl->ngMgr().metadataStatus( info ).unwrap(); }
127
128 RepoManager::RefreshCheckStatus RepoManager::checkIfToRefreshMetadata(const RepoInfo &info, const zypp::MirroredOrigin &origin, RawMetadataRefreshPolicy policy)
129 { return _pimpl->ngMgr().checkIfToRefreshMetadata( info, origin, policy ).unwrap(); }
130
131 RepoManager::RefreshCheckStatus RepoManager::checkIfToRefreshMetadata( const RepoInfo &info, const Url &url, RawMetadataRefreshPolicy policy )
132 { return _pimpl->ngMgr().checkIfToRefreshMetadata( info, url, policy ).unwrap(); }
133
134 Pathname RepoManager::metadataPath( const RepoInfo &info ) const
135 { return _pimpl->ngMgr().metadataPath( info ).unwrap(); }
136
137 Pathname RepoManager::packagesPath( const RepoInfo &info ) const
138 { return _pimpl->ngMgr().packagesPath( info ).unwrap(); }
139
140 void RepoManager::refreshMetadata( const RepoInfo &info, RawMetadataRefreshPolicy policy, const ProgressData::ReceiverFnc & progressrcv )
141 {
142 // Suppress (interactive) media::MediaChangeReport if we have fallback URLs
143 zypp::media::ScopedDisableMediaChangeReport guard( info.repoOrigins().hasFallbackUrls() );
144 return _pimpl->ngMgr().refreshMetadata( info, policy, nullptr ).unwrap();
145 }
146
147 void RepoManager::cleanMetadata( const RepoInfo &info, const ProgressData::ReceiverFnc & progressrcv )
148 { return _pimpl->ngMgr().cleanMetadata( info, nullptr ).unwrap(); }
149
150 void RepoManager::cleanPackages( const RepoInfo &info, const ProgressData::ReceiverFnc & progressrcv )
151 { return _pimpl->ngMgr().cleanPackages( info, nullptr ).unwrap(); }
152
153 RepoStatus RepoManager::cacheStatus( const RepoInfo &info ) const
154 { return _pimpl->ngMgr().cacheStatus( info ).unwrap(); }
155
156 void RepoManager::buildCache( const RepoInfo &info, CacheBuildPolicy policy, const ProgressData::ReceiverFnc & progressrcv )
157 {
158 callback::SendReport<ProgressReport> report;
159 auto adapt = zyppng::ProgressObserverAdaptor( progressrcv, report );
160 return _pimpl->ngMgr().buildCache( info, policy, adapt.observer() ).unwrap();
161 }
162
163 void RepoManager::cleanCache( const RepoInfo &info, const ProgressData::ReceiverFnc & progressrcv )
164 { return _pimpl->ngMgr().cleanCache( info, nullptr ).unwrap(); }
165
166 bool RepoManager::isCached( const RepoInfo &info ) const
167 { return _pimpl->ngMgr().isCached( info ).unwrap(); }
168
169 void RepoManager::loadFromCache( const RepoInfo &info, const ProgressData::ReceiverFnc & progressrcv )
170 { return _pimpl->ngMgr().loadFromCache( info, nullptr ).unwrap(); }
171
172 void RepoManager::cleanCacheDirGarbage( const ProgressData::ReceiverFnc & progressrcv )
173 { return _pimpl->ngMgr().cleanCacheDirGarbage( nullptr ).unwrap(); }
174
175 repo::RepoType RepoManager::probe( const Url & url, const Pathname & path ) const
176 { return _pimpl->ngMgr().probe( {url}, path ).unwrap(); }
177
178 repo::RepoType RepoManager::probe( const Url & url ) const
179 { return _pimpl->ngMgr().probe( {url} ).unwrap(); }
180
181 void RepoManager::addRepository( const RepoInfo &info, const ProgressData::ReceiverFnc & progressrcv )
182 {
183 callback::SendReport<ProgressReport> report;
184 auto adapt = zyppng::ProgressObserverAdaptor( progressrcv, report );
185 RepoInfo updatedRepo = _pimpl->ngMgr().addRepository( info, adapt.observer() ).unwrap();
186
187 // We should fix the API as we must inject those paths
188 // into the repoinfo in order to keep it usable.
189 RepoInfo & oinfo( const_cast<RepoInfo &>(info) );
190 oinfo.setFilepath( updatedRepo.filepath() );
191 oinfo.setMetadataPath( zyppng::rawcache_path_for_repoinfo( _pimpl->ngMgr().options(), updatedRepo ).unwrap() );
192 oinfo.setPackagesPath( zyppng::packagescache_path_for_repoinfo( _pimpl->ngMgr().options(), updatedRepo ).unwrap() );
193 }
194
195 void RepoManager::addRepositories( const Url &url, const ProgressData::ReceiverFnc & progressrcv )
196 { return _pimpl->ngMgr().addRepositories( url, nullptr ).unwrap(); }
197
198 void RepoManager::removeRepository( const RepoInfo & info, const ProgressData::ReceiverFnc & progressrcv )
199 {
200 callback::SendReport<ProgressReport> report;
201 auto adapt = zyppng::ProgressObserverAdaptor( progressrcv, report );
202 return _pimpl->ngMgr().removeRepository( info, adapt.observer() ).unwrap();
203 }
204
205 void RepoManager::modifyRepository( const std::string &alias, const RepoInfo & newinfo, const ProgressData::ReceiverFnc & progressrcv )
206 {
207 RepoInfo updated = _pimpl->ngMgr().modifyRepository( alias, newinfo, nullptr ).unwrap();
208 // We should fix the API as we must inject those paths
209 // into the repoinfo in order to keep it usable.
210 RepoInfo & oinfo( const_cast<RepoInfo &>(newinfo) );
211 oinfo.setFilepath( updated.filepath());
212 oinfo.setMetadataPath( zyppng::rawcache_path_for_repoinfo( _pimpl->ngMgr().options(), updated ).unwrap() );
213 oinfo.setPackagesPath( zyppng::packagescache_path_for_repoinfo( _pimpl->ngMgr().options(), updated ).unwrap() );
214 }
215
216 RepoInfo RepoManager::getRepositoryInfo( const std::string &alias, const ProgressData::ReceiverFnc & progressrcv )
217 { return _pimpl->ngMgr().getRepositoryInfo( alias ).unwrap(); }
218
219 RepoInfo RepoManager::getRepositoryInfo( const Url & url, const url::ViewOption & urlview, const ProgressData::ReceiverFnc & progressrcv )
220 { return _pimpl->ngMgr().getRepositoryInfo( url, urlview ).unwrap(); }
221
222 bool RepoManager::serviceEmpty() const
223 { return _pimpl->ngMgr().serviceEmpty(); }
224
225 RepoManager::ServiceSizeType RepoManager::serviceSize() const
226 { return _pimpl->ngMgr().serviceSize(); }
227
228 RepoManager::ServiceConstIterator RepoManager::serviceBegin() const
229 { return _pimpl->ngMgr().serviceBegin(); }
230
231 RepoManager::ServiceConstIterator RepoManager::serviceEnd() const
232 { return _pimpl->ngMgr().serviceEnd(); }
233
234 ServiceInfo RepoManager::getService( const std::string & alias ) const
235 { return _pimpl->ngMgr().getService( alias ); }
236
237 bool RepoManager::hasService( const std::string & alias ) const
238 { return _pimpl->ngMgr().hasService( alias ); }
239
240 repo::ServiceType RepoManager::probeService( const Url &url ) const
241 { return _pimpl->ngMgr().probeService( url ).unwrap(); }
242
243 void RepoManager::addService( const std::string & alias, const Url& url )
244 { return _pimpl->ngMgr().addService( alias, url ).unwrap(); }
245
246 void RepoManager::addService( const ServiceInfo & service )
247 { return _pimpl->ngMgr().addService( service ).unwrap(); }
248
249 void RepoManager::removeService( const std::string & alias )
250 { return _pimpl->ngMgr().removeService( alias ).unwrap(); }
251
252 void RepoManager::removeService( const ServiceInfo & service )
253 { return _pimpl->ngMgr().removeService( service ).unwrap(); }
254
255 void RepoManager::refreshServices( const RefreshServiceOptions & options_r )
256 { return _pimpl->ngMgr().refreshServices( options_r ).unwrap(); }
257
258 void RepoManager::refreshService( const std::string & alias, const RefreshServiceOptions & options_r )
259 { return _pimpl->ngMgr().refreshService( alias, options_r ).unwrap(); }
260
261 void RepoManager::refreshService( const ServiceInfo & service, const RefreshServiceOptions & options_r )
262 { return _pimpl->ngMgr().refreshService( service, options_r ).unwrap(); }
263
264 void RepoManager::modifyService( const std::string & oldAlias, const ServiceInfo & service )
265 { return _pimpl->ngMgr().modifyService( oldAlias, service ).unwrap(); }
266
267 void RepoManager::refreshGeoIp (const RepoInfo::url_set &urls)
268 { (void) _pimpl->ngMgr().refreshGeoIp( urls ); }
269
271
272 std::ostream & operator<<( std::ostream & str, const RepoManager & obj )
273 { return str << *obj._pimpl; }
274
275 std::list<RepoInfo> readRepoFile(const Url &repo_file)
276 {
277 return zyppng::RepoManagerWorkflow::readRepoFile( zyppng::SyncContext::defaultContext (), repo_file ).unwrap();
278 }
279
281} // namespace zypp
zypp::Date::ValueType
time_t ValueType
Definition Date.h:38
zypp::Date::now
static Date now()
Return the current time.
Definition Date.h:78
zypp::Digest::digest
std::string digest()
get hex string representation of the digest
Definition Digest.cc:239
zypp::Digest::sha1
static const std::string & sha1()
sha1
Definition Digest.cc:45
zypp::MirroredOriginSet::hasFallbackUrls
bool hasFallbackUrls() const
Whether this set contains more than one Url in total (authorities or mirrors).
Definition MirroredOrigin.cc:404
zypp::MirroredOrigin
Manages a data source characterized by an authoritative URL and a list of mirror URLs.
Definition MirroredOrigin.h:170
zypp::ProgressData::ReceiverFnc
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Definition progressdata.h:140
zypp::RepoInfo
What is known about a repository.
Definition RepoInfo.h:72
zypp::RepoInfo::repoOrigins
MirroredOriginSet repoOrigins() const
The repodata origins.
Definition RepoInfo.cc:689
zypp::RepoInfo::setPackagesPath
void setPackagesPath(const Pathname &path)
set the path where the local packages are stored
Definition RepoInfo.cc:712
zypp::RepoInfo::setMetadataPath
void setMetadataPath(const Pathname &path)
Set the path where the local metadata is stored.
Definition RepoInfo.cc:709
zypp::RepoInfo::url_set
std::list< Url > url_set
Definition RepoInfo.h:108
zypp::RepoManager::hasRepo
bool hasRepo(const std::string &alias) const
Return whether there is a known repository for alias.
Definition RepoManager.cc:102
zypp::RepoManager::cleanCacheDirGarbage
void cleanCacheDirGarbage(const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Remove any subdirectories of cache directories which no longer belong to any of known repositories.
Definition RepoManager.cc:172
zypp::RepoManager::operator<<
friend std::ostream & operator<<(std::ostream &str, const RepoManager &obj)
Definition RepoManager.cc:272
zypp::RepoManager::cleanMetadata
void cleanMetadata(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Clean local metadata.
Definition RepoManager.cc:147
zypp::RepoManager::~RepoManager
~RepoManager()
Dtor.
Definition RepoManager.cc:84
zypp::RepoManager::serviceEmpty
bool serviceEmpty() const
Gets true if no service is in RepoManager (so no one in specified location)
Definition RepoManager.cc:222
zypp::RepoManager::hasService
bool hasService(const std::string &alias) const
Return whether there is a known service for alias.
Definition RepoManager.cc:237
zypp::RepoManager::ServiceConstIterator
ServiceSet::const_iterator ServiceConstIterator
Definition RepoManager.h:68
zypp::RepoManager::addService
void addService(const std::string &alias, const Url &url)
Adds a new service by its alias and URL.
Definition RepoManager.cc:243
zypp::RepoManager::isCached
bool isCached(const RepoInfo &info) const
Whether a repository exists in cache.
Definition RepoManager.cc:166
zypp::RepoManager::removeService
void removeService(const std::string &alias)
Removes service specified by its name.
Definition RepoManager.cc:249
zypp::RepoManager::getRepo
RepoInfo getRepo(const std::string &alias) const
Find RepoInfo by alias or return RepoInfo::noRepo.
Definition RepoManager.cc:99
zypp::RepoManager::probeService
repo::ServiceType probeService(const Url &url) const
Probe the type or the service.
Definition RepoManager.cc:240
zypp::RepoManager::_pimpl
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
Definition RepoManager.h:660
zypp::RepoManager::RawMetadataRefreshPolicy
RepoManagerFlags::RawMetadataRefreshPolicy RawMetadataRefreshPolicy
Definition RepoManager.h:81
zypp::RepoManager::cleanCache
void cleanCache(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
clean local cache
Definition RepoManager.cc:163
zypp::RepoManager::refreshServices
void refreshServices(const RefreshServiceOptions &options_r=RefreshServiceOptions())
Refreshes all enabled services.
Definition RepoManager.cc:255
zypp::RepoManager::addRepository
void addRepository(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Adds a repository to the list of known repositories.
Definition RepoManager.cc:181
zypp::RepoManager::repoEmpty
bool repoEmpty() const
Definition RepoManager.cc:87
zypp::RepoManager::metadataPath
Pathname metadataPath(const RepoInfo &info) const
Path where the metadata is downloaded and kept.
Definition RepoManager.cc:134
zypp::RepoManager::ServiceSizeType
ServiceSet::size_type ServiceSizeType
Definition RepoManager.h:69
zypp::RepoManager::packagesPath
Pathname packagesPath(const RepoInfo &info) const
Path where the rpm packages are downloaded and kept.
Definition RepoManager.cc:137
zypp::RepoManager::cacheStatus
RepoStatus cacheStatus(const RepoInfo &info) const
Status of metadata cache.
Definition RepoManager.cc:153
zypp::RepoManager::addRepositories
void addRepositories(const Url &url, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Adds repositores from a repo file to the list of known repositories.
Definition RepoManager.cc:195
zypp::RepoManager::refreshMetadata
void refreshMetadata(const RepoInfo &info, RawMetadataRefreshPolicy policy=RefreshIfNeeded, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Refresh local raw cache.
Definition RepoManager.cc:140
zypp::RepoManager::refreshGeoIp
void refreshGeoIp(const RepoInfo::url_set &urls)
Definition RepoManager.cc:267
zypp::RepoManager::refreshService
void refreshService(const std::string &alias, const RefreshServiceOptions &options_r=RefreshServiceOptions())
Refresh specific service.
Definition RepoManager.cc:258
zypp::RepoManager::serviceEnd
ServiceConstIterator serviceEnd() const
Iterator to place behind last service in internal storage.
Definition RepoManager.cc:231
zypp::RepoManager::CacheBuildPolicy
RepoManagerFlags::CacheBuildPolicy CacheBuildPolicy
Definition RepoManager.h:86
zypp::RepoManager::serviceBegin
ServiceConstIterator serviceBegin() const
Iterator to first service in internal storage.
Definition RepoManager.cc:228
zypp::RepoManager::RefreshCheckStatus
RepoManagerFlags::RefreshCheckStatus RefreshCheckStatus
Definition RepoManager.h:140
zypp::RepoManager::repoSize
RepoSizeType repoSize() const
Definition RepoManager.cc:90
zypp::RepoManager::modifyRepository
void modifyRepository(const std::string &alias, const RepoInfo &newinfo, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Modify repository attributes.
Definition RepoManager.cc:205
zypp::RepoManager::removeRepository
void removeRepository(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Remove the best matching repository from known repos list.
Definition RepoManager.cc:198
zypp::RepoManager::getRepositoryInfo
RepoInfo getRepositoryInfo(const std::string &alias, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Find a matching repository info.
Definition RepoManager.cc:216
zypp::RepoManager::serviceSize
ServiceSizeType serviceSize() const
Gets count of service in RepoManager (in specified location)
Definition RepoManager.cc:225
zypp::RepoManager::getService
ServiceInfo getService(const std::string &alias) const
Finds ServiceInfo by alias or return ServiceInfo::noService.
Definition RepoManager.cc:234
zypp::RepoManager::checkIfToRefreshMetadata
RefreshCheckStatus checkIfToRefreshMetadata(const RepoInfo &info, const Url &url, RawMetadataRefreshPolicy policy=RefreshIfNeeded)
Checks whether to refresh metadata for specified repository and url.
Definition RepoManager.cc:131
zypp::RepoManager::RepoSizeType
RepoSet::size_type RepoSizeType
Definition RepoManager.h:74
zypp::RepoManager::repoBegin
RepoConstIterator repoBegin() const
Definition RepoManager.cc:93
zypp::RepoManager::buildCache
void buildCache(const RepoInfo &info, CacheBuildPolicy policy=BuildIfNeeded, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Refresh local cache.
Definition RepoManager.cc:156
zypp::RepoManager::RefreshServiceOptions
RepoManagerFlags::RefreshServiceFlags RefreshServiceOptions
Options tuning RefreshService.
Definition RepoManager.h:98
zypp::RepoManager::RepoManager
RepoManager(RepoManagerOptions options=RepoManagerOptions())
Definition repomanager.cc:239
zypp::RepoManager::loadFromCache
void loadFromCache(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Load resolvables into the pool.
Definition RepoManager.cc:169
zypp::RepoManager::cleanPackages
void cleanPackages(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Clean local package cache.
Definition RepoManager.cc:150
zypp::RepoManager::repoEnd
RepoConstIterator repoEnd() const
Definition RepoManager.cc:96
zypp::RepoManager::metadataStatus
RepoStatus metadataStatus(const RepoInfo &info) const
Status of local metadata.
Definition RepoManager.cc:125
zypp::RepoManager::modifyService
void modifyService(const std::string &oldAlias, const ServiceInfo &service)
Modifies service file (rewrites it with new values) and underlying repositories if needed.
Definition RepoManager.cc:264
zypp::RepoManager::RepoConstIterator
RepoSet::const_iterator RepoConstIterator
Definition RepoManager.h:73
zypp::RepoManager::makeStupidAlias
static std::string makeStupidAlias(const Url &url_r=Url())
Some stupid string but suitable as alias for your url if nothing better is available.
Definition RepoManager.cc:105
zypp::RepoManager::probe
repo::RepoType probe(const Url &url, const Pathname &path) const
Probe repo metadata type.
Definition RepoManager.cc:175
zypp::RepoStatus
Track changing files or directories.
Definition RepoStatus.h:41
zypp::ServiceInfo
Service data.
Definition ServiceInfo.h:37
zypp::Url
Url manipulation class.
Definition Url.h:93
zypp::Url::getScheme
std::string getScheme() const
Returns the scheme name of the URL.
Definition Url.cc:551
zypp::Url::asCompleteString
std::string asCompleteString() const
Returns a complete string representation of the Url object.
Definition Url.cc:523
zypp::Url::getHost
std::string getHost(EEncoding eflag=zypp::url::E_DECODED) const
Returns the hostname or IP from the URL authority.
Definition Url.cc:606
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:47
zypp::repo::RepoInfoBase::setFilepath
void setFilepath(const Pathname &filename)
set the path to the .repo file
Definition RepoInfoBase.cc:95
zypp::repo::RepoInfoBase::filepath
Pathname filepath() const
File where this repo was read from.
Definition RepoInfoBase.cc:127
zyppng::RepoManager< SyncContextRef >::create
static expected< std::shared_ptr< RepoManager< SyncContextRef > > > create(Args &&...args)
Definition repomanager.h:271
zyppng::SyncContext::defaultContext
static SyncContextRef defaultContext()
Definition contextfacade.cc:26
contextfacade.h
std
Definition Arch.h:364
str
String related utilities and Regular expression matching.
zypp::repo
Definition DeltaCandidates.cc:30
zypp::str::hexstring
std::string hexstring(char n, int w=4)
Definition String.h:325
zypp::url
Url details namespace.
Definition UrlBase.cc:58
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition Application.cc:20
zypp::readRepoFile
std::list< RepoInfo > readRepoFile(const Url &repo_file)
Parses repo_file and returns a list of RepoInfo objects corresponding to repositories found within th...
Definition RepoManager.cc:275
zyppng::RepoManagerWorkflow::readRepoFile
AsyncOpRef< expected< std::list< RepoInfo > > > readRepoFile(ContextRef ctx, zypp::Url repoFileUrl)
Definition repomanagerwf.cc:226
zyppng
Definition MediaNetworkRequestExecutor.h:16
zyppng::SyncRepoManager
RepoManager< SyncContextRef > SyncRepoManager
Definition repomanager.h:48
zyppng::rawcache_path_for_repoinfo
expected< zypp::Pathname > rawcache_path_for_repoinfo(const RepoManagerOptions &opt, const RepoInfo &info)
Calculates the raw cache path for a repository, this is usually /var/cache/zypp/alias.
Definition repomanager.h:172
zyppng::SyncRepoManagerRef
RepoManagerRef< SyncContextRef > SyncRepoManagerRef
Definition repomanager.h:49
zyppng::packagescache_path_for_repoinfo
expected< zypp::Pathname > packagescache_path_for_repoinfo(const RepoManagerOptions &opt, const RepoInfo &info)
Calculates the packages cache path for a repository.
Definition repomanager.h:195
progressobserveradaptor.h
refresh.h
repomanagerwf.h
zypp::RepoManagerOptions
Repo manager settings.
Definition RepoManagerOptions.h:26
zypp::RepoManager::Impl
RepoManager implementation.
Definition RepoManager.cc:39
zypp::RepoManager::Impl::operator=
Impl & operator=(const Impl &)=delete
zypp::RepoManager::Impl::Impl
Impl(zyppng::SyncContextRef &&ctx, RepoManagerOptions &&opt)
Definition RepoManager.cc:41
zypp::RepoManager::Impl::ngMgr
zyppng::SyncRepoManager & ngMgr()
Definition RepoManager.cc:55
zypp::RepoManager::Impl::_ngMgr
zyppng::SyncRepoManagerRef _ngMgr
Definition RepoManager.cc:60
zypp::RepoManager::Impl::Impl
Impl(const Impl &)=delete
zypp::RepoManager::Impl::operator<<
std::ostream & operator<<(std::ostream &str, const RepoManager::Impl &obj)
Stream output.
Definition RepoManager.cc:71
zypp::RepoManager::Impl::rwcowClone
friend Impl * rwcowClone(const Impl *rhs)
zypp::RepoManager::Impl::Impl
Impl(Impl &&)=delete
zypp::RepoManager::Impl::clone
Impl * clone() const
clone for RWCOW_pointer
Definition RepoManager.cc:65
zypp::RepoManager::Impl::operator=
Impl & operator=(Impl &&)=delete
zypp::RepoManager::Impl::ngMgr
const zyppng::SyncRepoManager & ngMgr() const
Definition RepoManager.cc:51
zypp::callback::SendReport
Definition Callback.h:237
zypp::media::ScopedDisableMediaChangeReport
Temporarily disable MediaChangeReport Sometimes helpful to suppress interactive messages connected to...
Definition ZYppCallbacks.h:354
zypp::repo::RepoType
Repository type enumeration.
Definition RepoType.h:29
zypp::repo::ServiceType
Service type enumeration.
Definition ServiceType.h:27
zypp::url::ViewOption
Url::asString() view options.
Definition UrlBase.h:41
zyppng::ProgressObserverAdaptor
Definition progressobserveradaptor.h:17
Digest.h
ZYPP_LOCAL
#define ZYPP_LOCAL
Definition Globals.h:71