libzypp: zypp/RepoManager.cc Source File

libzypp 17.36.6

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
24using std::endl;
25using std::string;
26using namespace zypp::repo;
27
28#define OPT_PROGRESS const ProgressData::ReceiverFnc & = ProgressData::ReceiverFnc()
29
31namespace 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 Url &url, RawMetadataRefreshPolicy policy )
129 { return _pimpl->ngMgr().checkIfToRefreshMetadata( info, url, policy ).unwrap(); }
130
131 Pathname RepoManager::metadataPath( const RepoInfo &info ) const
132 { return _pimpl->ngMgr().metadataPath( info ).unwrap(); }
133
134 Pathname RepoManager::packagesPath( const RepoInfo &info ) const
135 { return _pimpl->ngMgr().packagesPath( info ).unwrap(); }
136
137 void RepoManager::refreshMetadata( const RepoInfo &info, RawMetadataRefreshPolicy policy, const ProgressData::ReceiverFnc & progressrcv )
138 {
139 // Suppress (interactive) media::MediaChangeReport if we in have multiple basurls (>1)
140 zypp::media::ScopedDisableMediaChangeReport guard( info.baseUrlsSize() > 1 );
141 return _pimpl->ngMgr().refreshMetadata( info, policy, nullptr ).unwrap();
142 }
143
144 void RepoManager::cleanMetadata( const RepoInfo &info, const ProgressData::ReceiverFnc & progressrcv )
145 { return _pimpl->ngMgr().cleanMetadata( info, nullptr ).unwrap(); }
146
147 void RepoManager::cleanPackages( const RepoInfo &info, const ProgressData::ReceiverFnc & progressrcv )
148 { return _pimpl->ngMgr().cleanPackages( info, nullptr ).unwrap(); }
149
150 RepoStatus RepoManager::cacheStatus( const RepoInfo &info ) const
151 { return _pimpl->ngMgr().cacheStatus( info ).unwrap(); }
152
153 void RepoManager::buildCache( const RepoInfo &info, CacheBuildPolicy policy, const ProgressData::ReceiverFnc & progressrcv )
154 {
155 callback::SendReport<ProgressReport> report;
156 auto adapt = zyppng::ProgressObserverAdaptor( progressrcv, report );
157 return _pimpl->ngMgr().buildCache( info, policy, adapt.observer() ).unwrap();
158 }
159
160 void RepoManager::cleanCache( const RepoInfo &info, const ProgressData::ReceiverFnc & progressrcv )
161 { return _pimpl->ngMgr().cleanCache( info, nullptr ).unwrap(); }
162
163 bool RepoManager::isCached( const RepoInfo &info ) const
164 { return _pimpl->ngMgr().isCached( info ).unwrap(); }
165
166 void RepoManager::loadFromCache( const RepoInfo &info, const ProgressData::ReceiverFnc & progressrcv )
167 { return _pimpl->ngMgr().loadFromCache( info, nullptr ).unwrap(); }
168
169 void RepoManager::cleanCacheDirGarbage( const ProgressData::ReceiverFnc & progressrcv )
170 { return _pimpl->ngMgr().cleanCacheDirGarbage( nullptr ).unwrap(); }
171
172 repo::RepoType RepoManager::probe( const Url & url, const Pathname & path ) const
173 { return _pimpl->ngMgr().probe( url, path ).unwrap(); }
174
175 repo::RepoType RepoManager::probe( const Url & url ) const
176 { return _pimpl->ngMgr().probe( url ).unwrap(); }
177
178 void RepoManager::addRepository( const RepoInfo &info, const ProgressData::ReceiverFnc & progressrcv )
179 {
180 callback::SendReport<ProgressReport> report;
181 auto adapt = zyppng::ProgressObserverAdaptor( progressrcv, report );
182 RepoInfo updatedRepo = _pimpl->ngMgr().addRepository( info, adapt.observer() ).unwrap();
183
184 // We should fix the API as we must inject those paths
185 // into the repoinfo in order to keep it usable.
186 RepoInfo & oinfo( const_cast<RepoInfo &>(info) );
187 oinfo.setFilepath( updatedRepo.filepath() );
188 oinfo.setMetadataPath( zyppng::rawcache_path_for_repoinfo( _pimpl->ngMgr().options(), updatedRepo ).unwrap() );
189 oinfo.setPackagesPath( zyppng::packagescache_path_for_repoinfo( _pimpl->ngMgr().options(), updatedRepo ).unwrap() );
190 }
191
192 void RepoManager::addRepositories( const Url &url, const ProgressData::ReceiverFnc & progressrcv )
193 { return _pimpl->ngMgr().addRepositories( url, nullptr ).unwrap(); }
194
195 void RepoManager::removeRepository( const RepoInfo & info, const ProgressData::ReceiverFnc & progressrcv )
196 {
197 callback::SendReport<ProgressReport> report;
198 auto adapt = zyppng::ProgressObserverAdaptor( progressrcv, report );
199 return _pimpl->ngMgr().removeRepository( info, adapt.observer() ).unwrap();
200 }
201
202 void RepoManager::modifyRepository( const std::string &alias, const RepoInfo & newinfo, const ProgressData::ReceiverFnc & progressrcv )
203 {
204 RepoInfo updated = _pimpl->ngMgr().modifyRepository( alias, newinfo, nullptr ).unwrap();
205 // We should fix the API as we must inject those paths
206 // into the repoinfo in order to keep it usable.
207 RepoInfo & oinfo( const_cast<RepoInfo &>(newinfo) );
208 oinfo.setFilepath( updated.filepath());
209 oinfo.setMetadataPath( zyppng::rawcache_path_for_repoinfo( _pimpl->ngMgr().options(), updated ).unwrap() );
210 oinfo.setPackagesPath( zyppng::packagescache_path_for_repoinfo( _pimpl->ngMgr().options(), updated ).unwrap() );
211 }
212
213 RepoInfo RepoManager::getRepositoryInfo( const std::string &alias, const ProgressData::ReceiverFnc & progressrcv )
214 { return _pimpl->ngMgr().getRepositoryInfo( alias ).unwrap(); }
215
216 RepoInfo RepoManager::getRepositoryInfo( const Url & url, const url::ViewOption & urlview, const ProgressData::ReceiverFnc & progressrcv )
217 { return _pimpl->ngMgr().getRepositoryInfo( url, urlview ).unwrap(); }
218
219 bool RepoManager::serviceEmpty() const
220 { return _pimpl->ngMgr().serviceEmpty(); }
221
222 RepoManager::ServiceSizeType RepoManager::serviceSize() const
223 { return _pimpl->ngMgr().serviceSize(); }
224
225 RepoManager::ServiceConstIterator RepoManager::serviceBegin() const
226 { return _pimpl->ngMgr().serviceBegin(); }
227
228 RepoManager::ServiceConstIterator RepoManager::serviceEnd() const
229 { return _pimpl->ngMgr().serviceEnd(); }
230
231 ServiceInfo RepoManager::getService( const std::string & alias ) const
232 { return _pimpl->ngMgr().getService( alias ); }
233
234 bool RepoManager::hasService( const std::string & alias ) const
235 { return _pimpl->ngMgr().hasService( alias ); }
236
237 repo::ServiceType RepoManager::probeService( const Url &url ) const
238 { return _pimpl->ngMgr().probeService( url ).unwrap(); }
239
240 void RepoManager::addService( const std::string & alias, const Url& url )
241 { return _pimpl->ngMgr().addService( alias, url ).unwrap(); }
242
243 void RepoManager::addService( const ServiceInfo & service )
244 { return _pimpl->ngMgr().addService( service ).unwrap(); }
245
246 void RepoManager::removeService( const std::string & alias )
247 { return _pimpl->ngMgr().removeService( alias ).unwrap(); }
248
249 void RepoManager::removeService( const ServiceInfo & service )
250 { return _pimpl->ngMgr().removeService( service ).unwrap(); }
251
252 void RepoManager::refreshServices( const RefreshServiceOptions & options_r )
253 { return _pimpl->ngMgr().refreshServices( options_r ).unwrap(); }
254
255 void RepoManager::refreshService( const std::string & alias, const RefreshServiceOptions & options_r )
256 { return _pimpl->ngMgr().refreshService( alias, options_r ).unwrap(); }
257
258 void RepoManager::refreshService( const ServiceInfo & service, const RefreshServiceOptions & options_r )
259 { return _pimpl->ngMgr().refreshService( service, options_r ).unwrap(); }
260
261 void RepoManager::modifyService( const std::string & oldAlias, const ServiceInfo & service )
262 { return _pimpl->ngMgr().modifyService( oldAlias, service ).unwrap(); }
263
264 void RepoManager::refreshGeoIp (const RepoInfo::url_set &urls)
265 { (void) _pimpl->ngMgr().refreshGeoIp( urls ); }
266
268
269 std::ostream & operator<<( std::ostream & str, const RepoManager & obj )
270 { return str << *obj._pimpl; }
271
272 std::list<RepoInfo> readRepoFile(const Url &repo_file)
273 {
274 return zyppng::RepoManagerWorkflow::readRepoFile( zyppng::SyncContext::defaultContext (), repo_file ).unwrap();
275 }
276
278} // 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:238
zypp::Digest::sha1
static const std::string & sha1()
sha1
Definition Digest.cc:44
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::baseUrlsSize
urls_size_type baseUrlsSize() const
number of repository urls
Definition RepoInfo.cc:675
zypp::RepoInfo::setPackagesPath
void setPackagesPath(const Pathname &path)
set the path where the local packages are stored
Definition RepoInfo.cc:594
zypp::RepoInfo::setMetadataPath
void setMetadataPath(const Pathname &path)
Set the path where the local metadata is stored.
Definition RepoInfo.cc:591
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:169
zypp::RepoManager::operator<<
friend std::ostream & operator<<(std::ostream &str, const RepoManager &obj)
Definition RepoManager.cc:269
zypp::RepoManager::cleanMetadata
void cleanMetadata(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Clean local metadata.
Definition RepoManager.cc:144
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:219
zypp::RepoManager::hasService
bool hasService(const std::string &alias) const
Return whether there is a known service for alias.
Definition RepoManager.cc:234
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:240
zypp::RepoManager::isCached
bool isCached(const RepoInfo &info) const
Whether a repository exists in cache.
Definition RepoManager.cc:163
zypp::RepoManager::removeService
void removeService(const std::string &alias)
Removes service specified by its name.
Definition RepoManager.cc:246
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:237
zypp::RepoManager::_pimpl
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
Definition RepoManager.h:649
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:160
zypp::RepoManager::refreshServices
void refreshServices(const RefreshServiceOptions &options_r=RefreshServiceOptions())
Refreshes all enabled services.
Definition RepoManager.cc:252
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:178
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:131
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:134
zypp::RepoManager::cacheStatus
RepoStatus cacheStatus(const RepoInfo &info) const
Status of metadata cache.
Definition RepoManager.cc:150
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:192
zypp::RepoManager::refreshMetadata
void refreshMetadata(const RepoInfo &info, RawMetadataRefreshPolicy policy=RefreshIfNeeded, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Refresh local raw cache.
Definition RepoManager.cc:137
zypp::RepoManager::refreshGeoIp
void refreshGeoIp(const RepoInfo::url_set &urls)
Definition RepoManager.cc:264
zypp::RepoManager::refreshService
void refreshService(const std::string &alias, const RefreshServiceOptions &options_r=RefreshServiceOptions())
Refresh specific service.
Definition RepoManager.cc:255
zypp::RepoManager::serviceEnd
ServiceConstIterator serviceEnd() const
Iterator to place behind last service in internal storage.
Definition RepoManager.cc:228
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:225
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:202
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:195
zypp::RepoManager::getRepositoryInfo
RepoInfo getRepositoryInfo(const std::string &alias, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Find a matching repository info.
Definition RepoManager.cc:213
zypp::RepoManager::serviceSize
ServiceSizeType serviceSize() const
Gets count of service in RepoManager (in specified location)
Definition RepoManager.cc:222
zypp::RepoManager::getService
ServiceInfo getService(const std::string &alias) const
Finds ServiceInfo by alias or return ServiceInfo::noService.
Definition RepoManager.cc:231
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:128
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:153
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:166
zypp::RepoManager::cleanPackages
void cleanPackages(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Clean local package cache.
Definition RepoManager.cc:147
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:261
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:172
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:100
zypp::repo::RepoInfoBase::filepath
Pathname filepath() const
File where this repo was read from.
Definition RepoInfoBase.cc:134
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:324
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:272
zyppng::RepoManagerWorkflow::readRepoFile
AsyncOpRef< expected< std::list< RepoInfo > > > readRepoFile(ContextRef ctx, zypp::Url repoFileUrl)
Definition repomanagerwf.cc:224
zyppng
Definition MediaCurl2.h:22
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