15 #include <zypp-core/ng/io/Process> 16 #include <zypp-core/ng/pipelines/MTry> 17 #include <zypp-core/ng/pipelines/Algorithm> 18 #include <zypp-media/MediaException> 19 #include <zypp/ng/media/Provide> 20 #include <zypp-media/ng/ProvideSpec> 25 #include <zypp/ng/Context> 34 #undef ZYPP_BASE_LOGGER_LOGGROUP 35 #define ZYPP_BASE_LOGGER_LOGGROUP "zypp::repomanager" 56 auto maybeCopyResultToDest ( std::string &&subPath ) {
59 MIL <<
"Target path is set, copying " << file.file() <<
" to " << *
_targetPath/subPath << std::endl;
60 return std::move(file)
73 ,
_path(std::move(path))
77 MaybeAwaitable<expected<zypp::repo::RepoType>> execute( ) {
78 const auto &url =
_medium.baseUrl();
79 MIL <<
"going to probe the repo type at " << url <<
" (" <<
_path <<
")" << std::endl;
83 MIL <<
"Probed type NONE (not exists) at " << url <<
" (" <<
_path <<
")" << std::endl;
93 std::shared_ptr<Provide> providerRef =
_zyppContext->provider();
98 return providerRef->attachMediaIfNeeded(
_medium )
99 |
and_then([
this, providerRef]( MediaHandle medium )
102 return providerRef->provide( medium,
_path/
"repodata/repomd.xml",
ProvideFileSpec().setCheckExistsOnly( !
_targetPath.has_value() ).setMirrorsAllowed(
false) )
103 |
and_then( maybeCopyResultToDest(
"repodata/repomd.xml") )
106 |
or_else( [
this, providerRef, medium]( std::exception_ptr err ) {
108 std::rethrow_exception (err);
113 DBG <<
"problem checking for repodata/repomd.xml file" << std::endl;
121 |
and_then( maybeCopyResultToDest(
"content") )
125 |
or_else( [
this, medium]( std::exception_ptr err ) {
128 std::rethrow_exception (err);
133 DBG <<
"problem checking for content file" << std::endl;
145 const auto &url = medium.baseUrl();
148 if ( ! ( url.schemeIsDownloading() || url.schemeIsPlugin() ) ) {
152 MIL <<
"Probed type RPMPLAINDIR at " << url <<
" (" <<
_path <<
")" << std::endl;
160 MIL <<
"Probed type NONE at " << url <<
" (" <<
_path <<
")" << std::endl;
177 auto probeRepoLogic( ContextRef ctx,
RepoInfo repo, std::optional<zypp::Pathname> targetPath)
181 |
and_then( [ctx, path = repo.path() ](
auto &&mediaHandle ) {
182 return probeRepoType( ctx, std::forward<decltype(mediaHandle)>(mediaHandle), path );
190 ProbeRepoLogic impl( std::move(ctx), std::move(medium), std::move(path), std::move(targetPath) );
191 zypp_co_return zypp_co_await(impl.execute());
194 MaybeAwaitable<expected<zypp::repo::RepoType> >
probeRepoType( ContextRef ctx,
RepoInfo repo, std::optional<zypp::Pathname> targetPath )
196 if constexpr ( ZYPP_IS_ASYNC )
197 return probeRepoLogic( std::move(ctx), std::move(repo), std::move(targetPath) );
199 return probeRepoLogic( std::move(ctx), std::move(repo), std::move(targetPath) );
204 auto readRepoFileLogic( ContextRef ctx,
zypp::Url repoFileUrl )
208 |
and_then([repoFileUrl](
auto local ){
209 DBG <<
"reading repo file " << repoFileUrl <<
", local path: " << local.file() << std::endl;
217 return readRepoFileLogic( std::move(ctx), std::move(repoFileUrl) );
222 struct CheckIfToRefreshMetadataLogic {
228 CheckIfToRefreshMetadataLogic( repo::RefreshContextRef refCtx,
LazyMediaHandle &&medium, ProgressObserverRef progressObserver )
234 MaybeAwaitable<expected<repo::RefreshCheckStatus>> execute( ) {
236 MIL <<
"Going to CheckIfToRefreshMetadata" << std::endl;
242 MIL <<
"Check if to refresh repo " <<
_refreshContext->repoInfo().alias() <<
" at " <<
_medium.baseUrl() <<
" (" << info.type() <<
")" << std::endl;
251 if ( oldstatus.
empty() ) {
252 MIL <<
"No cached metadata, going to refresh" << std::endl;
256 if (
_medium.baseUrl().schemeIsVolatile() ) {
257 MIL <<
"Never refresh CD/DVD" << std::endl;
262 MIL <<
"Forced refresh!" << std::endl;
266 if (
_medium.baseUrl().schemeIsLocal() ) {
279 if ( oldstatus == *cachestatus ) {
282 const auto refDelay =
_refreshContext->zyppContext()->config().repo_refresh_delay();
283 if ( diff < refDelay ) {
285 WAR <<
"Repository '" << info.alias() <<
"' was refreshed in the future!" << std::endl;
288 MIL <<
"Repository '" << info.alias()
289 <<
"' has been refreshed less than repo.refresh.delay (" 291 <<
") minutes ago. Advising to skip refresh" << std::endl;
297 MIL <<
"Metadata and solv cache don't match. Check data on server..." << std::endl;
315 if ( oldstatus == newstatus ) {
316 MIL <<
"repo has not changed" << std::endl;
321 MIL <<
"repo has changed, going to refresh" << std::endl;
322 MIL <<
"Old status: " << oldstatus <<
" New Status: " << newstatus << std::endl;
339 CheckIfToRefreshMetadataLogic impl( std::move(refCtx), std::move(medium), std::move(progressObserver) );
340 zypp_co_return zypp_co_await(impl.execute());
346 struct RefreshMetadataLogic {
354 using DlContextRefType = std::shared_ptr<DlContextType>;
356 RefreshMetadataLogic( repo::RefreshContextRef refCtx,
LazyMediaHandle &&medium, ProgressObserverRef progressObserver )
362 MaybeAwaitable<expected<repo::RefreshContextRef>> execute() {
369 MIL <<
"RefreshCheckStatus returned: " << status << std::endl;
383 MIL <<
"Going to refresh metadata from " <<
_medium.baseUrl() << std::endl;
393 if ( info.type() != repokind ) {
396 info.setProbedType( repokind );
410 dlContext->setPluginRepoverification(
_refreshContext->pluginRepoverification() );
415 |
and_then([
this]( DlContextRefType && ) {
439 RefreshMetadataLogic impl( std::move(refCtx), std::move(medium), std::move(progressObserver));
440 zypp_co_return zypp_co_await(impl.execute());
444 auto refreshMetadataLogic( repo::RefreshContextRef refCtx, ProgressObserverRef progressObserver)
452 : rexception { info_r,
_(
"Failed to retrieve new repository metadata.") }
456 if ( rexception.historyEmpty() ) {
457 rexception.remember( old_r );
465 auto helper = std::make_shared<ExHelper>( ExHelper{ refCtx->repoInfo() } );
470 |
and_then( [ refCtx , progressObserver](
auto mediaHandle )
mutable {
return refreshMetadata ( std::move(refCtx), std::move(mediaHandle), progressObserver ); } );
474 auto predicate = [ info = refCtx->repoInfo(), helper ](
const expected<repo::RefreshContextRef> &res ) ->
bool{
480 ERR <<
"Giving up..." << std::endl;
481 helper->remember( e );
484 ERR <<
"Trying another url..." << std::endl;
485 helper->remember( e );
494 return refCtx->repoInfo().repoOrigins()
496 | [helper]( expected<repo::RefreshContextRef> result ) {
499 ERR <<
"No more urls..." << std::endl;
508 MaybeAwaitable<expected<repo::RefreshContextRef> >
refreshMetadata( repo::RefreshContextRef refCtx, ProgressObserverRef progressObserver) {
509 return refreshMetadataLogic ( std::move(refCtx), std::move(progressObserver) );
515 #ifdef ZYPP_ENABLE_ASYNC 522 : _repo(
std::move(repo) )
523 , _args(
std::move(args)) { }
525 bool await_ready() const noexcept {
return false; }
527 expected<void> await_resume() {
532 void await_suspend( std::coroutine_handle<> cont )
534 MIL <<
"Starting repo2solv for repo " << _repo.alias () << std::endl;
535 _cont = std::move(cont);
540 std::vector<const char *> argsIn;
541 argsIn.reserve ( args.size() );
542 std::for_each( args.begin (), args.end(), [&](
const std::string &s ) { argsIn.push_back(s.data()); });
543 argsIn.push_back (
nullptr);
545 if (!me->_proc->start( argsIn.data() )) {
551 const ByteArray &data = _proc->readLine();
552 const std::string &line = data.
asString();
557 void procFinished(
int ret ) {
559 while ( _proc->canReadLine() )
564 ex.addHistory(
zypp::str::Str() << _proc->executedCommand() << std::endl << _errdetail << _proc->execError() );
571 void setReady( expected<void> &&val ) {
580 std::string _errdetail;
581 std::coroutine_handle<> _cont;
582 std::optional<expected<void>>
_result;
586 MIL <<
"Starting repo2solv for repo " << repo.
alias () << std::endl;
587 co_return co_await Repo2SolvOp{ std::move(repo), std::move(args) };
592 std::string errdetail;
594 for ( std::string output( prog.receiveLine() ); output.length(); output = prog.receiveLine() ) {
595 WAR <<
" " << output;
599 int ret = prog.close();
603 ex.addHistory(
zypp::str::Str() << prog.command() << std::endl << errdetail << prog.execError() );
610 struct BuildCacheLogic {
618 MaybeAwaitable<expected<repo::RefreshContextRef>> execute() {
629 const auto &options =
_refCtx->repoManagerOptions();
640 if ( raw_metadata_status.empty() )
656 WAR <<
"No permission to write raw cache " << mediarootParent << std::endl;
665 bool needs_cleaning =
false;
666 const auto &info =
_refCtx->repoInfo();
667 if (
_refCtx->repoManager()->isCached( info ) )
669 MIL << info.alias() <<
" is already cached." << std::endl;
674 if ( *cache_status == raw_metadata_status )
676 MIL << info.alias() <<
" cache is up to date with metadata." << std::endl;
680 return makeReadyTask(
690 MIL << info.alias() <<
" cache rebuild is forced" << std::endl;
694 needs_cleaning =
true;
701 auto r =
_refCtx->repoManager()->cleanCache(info);
706 MIL << info.alias() <<
" building cache..." << info.type() << std::endl;
730 switch ( repokind.
toEnum() )
740 MIL <<
"repo type is " << repokind << std::endl;
742 return mountIfRequired( repokind, info )
743 |
and_then([
this, repokind, solvfile = std::move(solvfile) ]( std::optional<ProvideMediaHandle> forPlainDirs )
mutable {
745 const auto &info =
_refCtx->repoInfo();
747 switch ( repokind.
toEnum() )
757 #ifdef ZYPP_REPO2SOLV_PATH 758 cmd.push_back( ZYPP_REPO2SOLV_PATH );
760 cmd.push_back(
zypp::PathInfo(
"/usr/bin/repo2solv" ).isFile() ?
"repo2solv" :
"repo2solv.sh" );
763 cmd.push_back(
"-o" );
764 cmd.push_back( solvfile.
asString() );
765 cmd.push_back(
"-X" );
771 cmd.push_back(
"-R" );
773 std::optional<zypp::Pathname> localPath = forPlainDirs.has_value() ? forPlainDirs->localPath() :
zypp::Pathname();
778 cmd.push_back( (*localPath / info.path().absolutename()).c_str() );
783 return repo2Solv( info, std::move(cmd) )
784 |
and_then( [guard = std::move(guard), solvfile = std::move(solvfile) ]()
mutable {
786 guard.resetDispose();
796 |
and_then([
this, raw_metadata_status](){
798 return _refCtx->repoManager()->setCacheStatus(
_refCtx->repoInfo(), raw_metadata_status );
802 MIL <<
"Commit cache.." << std::endl;
807 |
or_else ( [
this]( std::exception_ptr e ) {
818 return _refCtx->zyppContext()->provider()->attachMedia( info.
url(), ProvideMediaSpec() )
819 |
and_then( []( ProvideMediaHandle handle ) {
820 return makeReadyTask(
make_expected_success( std::optional<ProvideMediaHandle>( std::move(handle)) ));
836 BuildCacheLogic impl( std::move(refCtx), policy, std::move(progressObserver));
837 zypp_co_return zypp_co_await ( impl.execute () );
844 struct AddRepoLogic {
846 AddRepoLogic( RepoManagerRef &&repoMgrRef,
RepoInfo &&info, ProgressObserverRef &&myProgress,
const zypp::TriBool & forcedProbe )
853 MaybeAwaitable<expected<RepoInfo> > execute() {
859 MIL <<
"Try adding repo " <<
_info << std::endl;
869 DBG <<
"unknown repository type, probing" << std::endl;
878 tosave.setType(probedtype);
888 MIL <<
"done" << std::endl;
891 |
or_else( [
this]( std::exception_ptr e) {
893 MIL <<
"done" << std::endl;
908 AddRepoLogic impl( std::move(mgr), std::move(info), std::move(myProgress), forcedProbe );
909 zypp_co_return zypp_co_await ( impl.execute () );
914 struct AddReposLogic {
915 AddReposLogic( RepoManagerRef &&repoMgrRef,
zypp::Url &&url, ProgressObserverRef &&myProgress )
921 MaybeAwaitable<expected<void>> execute() {
926 |
and_then([
this]( std::list<RepoInfo> repos ) {
928 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
935 if ( (*it).alias() == (*kit).alias() )
937 ERR <<
"To be added repo " << (*it).alias() <<
" conflicts with existing repo " << (*kit).alias() << std::endl;
957 MIL <<
"Saving " << repos.size() <<
" repo" << ( repos.size() ?
"s" :
"" ) <<
" in " << repofile << std::endl;
959 std::ofstream file(repofile.
c_str());
966 for ( std::list<RepoInfo>::iterator it = repos.begin();
970 MIL <<
"Saving " << (*it).alias() << std::endl;
978 it->dumpAsIniOn(file);
979 it->setFilepath(repofile);
980 it->setMetadataPath( *rawCachePath );
981 it->setPackagesPath( *pckCachePath );
987 MIL <<
"done" << std::endl;
1002 AddReposLogic impl( std::move(mgr), std::move(url), std::move(myProgress) );
1003 zypp_co_return zypp_co_await ( impl.execute () );
1009 struct RefreshGeoIpLogic {
1020 MaybeAwaitable<expected<void>> execute() {
1024 if ( !
_zyppCtx->config().geoipEnabled() ) {
1025 MIL <<
"GeoIp disabled via ZConfig, not refreshing the GeoIP information." << std::endl;
1029 std::vector<std::string> hosts;
1031 if ( !origin.schemeIsDownloading () )
1034 for (
const auto &originEndpoint : origin ) {
1035 const auto &host = originEndpoint.url().getHost();
1037 hosts.push_back( host );
1043 if ( hosts.empty() ) {
1044 MIL <<
"No configured geoip URL found, not updating geoip data" << std::endl;
1051 MIL <<
"Unable to create cache directory for GeoIP." << std::endl;
1056 MIL <<
"No access rights for the GeoIP cache directory." << std::endl;
1066 auto age = std::chrono::system_clock::now() - std::chrono::system_clock::from_time_t( pi.mtime() );
1067 if ( age < std::chrono::hours(24) )
1070 MIL <<
"Removing GeoIP file for " << entry.
name <<
" since it's older than 24hrs." << std::endl;
1075 auto firstOfCb = [
this]( std::string hostname ) {
1079 MIL <<
"Skipping GeoIP request for " << hostname <<
" since a valid cache entry exists." << std::endl;
1080 return makeReadyTask(
false);
1083 MIL <<
"Query GeoIP for " << hostname << std::endl;
1092 MIL <<
"Ignoring invalid GeoIP hostname: " << hostname << std::endl;
1093 return makeReadyTask(
false);
1097 return _zyppCtx->provider()->attachMedia( url, ProvideMediaSpec() )
1098 |
and_then( [
this]( MediaHandle provideHdl ) {
return _zyppCtx->provider()->provide( provideHdl,
"/geoip", ProvideFileSpec() ); })
1099 |
inspect_err( [hostname](
const std::exception_ptr& ){
MIL <<
"Failed to query GeoIP from hostname: " << hostname << std::endl; } )
1104 constexpr
auto writeHostToFile = [](
const zypp::Pathname &fName,
const std::string &host ){
1106 out.open( fName.
asString(), std::ios_base::trunc );
1107 if ( out.is_open() ) {
1108 out << host << std::endl;
1110 MIL <<
"Failed to create/open GeoIP cache file " << fName << std::endl;
1114 std::string geoipMirror;
1117 if ( reader.seekToNode( 1,
"host" ) ) {
1118 const auto &
str = reader.nodeText().asString();
1126 MIL <<
"Storing geoIP redirection: " << hostname <<
" -> " <<
str << std::endl;
1131 MIL <<
"No host entry or empty file returned for GeoIP, remembering for 24hrs" << std::endl;
1135 MIL <<
"Empty or invalid GeoIP file, not requesting again for 24hrs" << std::endl;
1138 writeHostToFile(
_geoIPCache / hostname, geoipMirror );
1141 | []( expected<void> res ) {
return res.is_valid(); };
1144 return std::move(hosts)
1146 | [](
bool foundGeoIP ) {
1149 MIL <<
"Successfully queried GeoIP data." << std::endl;
1153 MIL <<
"Failed to query GeoIP data." << std::endl;
1170 zypp_co_return zypp_co_await ( impl.execute () );
1175 RefreshGeoIpLogic impl( std::move(ctx), std::move(origins) );
1176 zypp_co_return zypp_co_await ( impl.execute () );
ProgressObserverRef _progressObserver
zypp::RepoStatus RepoStatus
MaybeAwaitable< expected< repo::RefreshContextRef > > refreshMetadata(repo::RefreshContextRef refCtx, LazyMediaHandle< Provide > medium, ProgressObserverRef progressObserver)
bool empty() const
Whether the status is empty (empty checksum)
thrown when it was impossible to determine this repo type.
int assert_dir(const Pathname &path, unsigned mode)
Like 'mkdir -p'.
Listentry returned by readdir.
expected< T, E > inspect(expected< T, E > exp, Function &&f)
SignalProxy< void(int)> sigFinished()
ProgressObserverRef _myProgress
MaybeAwaitable< expected< repo::RefreshContextRef > > buildCache(repo::RefreshContextRef refCtx, zypp::RepoManagerFlags::CacheBuildPolicy policy, ProgressObserverRef progressObserver)
expected< std::list< RepoInfo > > repositories_in_file(const zypp::Pathname &file)
Reads RepoInfo's from a repo file.
std::string asString() const
zypp::Pathname _mediarootpath
bool _doProbeUrl
RepoManagerOptions::probe opt. overwritten in by ctor arg forcedProbe.
const char * c_str() const
String representation.
String related utilities and Regular expression matching.
MaybeAwaitable< expected< RepoInfo > > addRepository(RepoManagerRef mgr, RepoInfo info, ProgressObserverRef myProgress, const zypp::TriBool &forcedProbe)
zypp::Pathname _geoIPCache
What is known about a repository.
static expected< std::decay_t< Type >, Err > make_expected_success(Type &&t)
std::optional< zypp::Pathname > _targetPath
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
void setHost(const std::string &host)
Set the hostname or IP in the URL authority.
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
ProgressObserverRef _progress
#define ZYPP_EXCPT_PTR(EXCPT)
Drops a logline and returns Exception as a std::exception_ptr.
expected< zypp::Pathname > packagescache_path_for_repoinfo(const RepoManagerOptions &opt, const RepoInfo &info)
Calculates the packages cache path for a repository.
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
void remember(const Exception &old_r)
Store an other Exception as history.
ResultType or_else(const expected< T, E > &exp, Function &&f)
zypp::MirroredOriginSet _origins
Url url() const
Pars pro toto: The first repository url, this is either baseUrls().front() or if no baseUrl is define...
zypp::repo::RepoException _error
#define ZYPP_RETHROW(EXCPT)
Drops a logline and rethrows, updating the CodeLocation.
std::string asString() const
Returns a default string representation of the Url object.
expected< zypp::Pathname > rawproductdata_path_for_repoinfo(const RepoManagerOptions &opt, const RepoInfo &info)
Calculates the raw product metadata path for a repository, this is inside the raw cache dir...
auto firstOf(Transformation &&transformFunc, DefaultType &&def, Predicate &&predicate=detail::ContinueUntilValidPredicate())
Convenient building of std::string via std::ostringstream Basically a std::ostringstream autoconverti...
Execute a program and give access to its io An object of this class encapsulates the execution of an ...
void setScheme(const std::string &scheme)
Set the scheme name in the URL.
Manages a data source characterized by an authoritative URL and a list of mirror URLs.
const std::string & asString() const
String representation.
std::string alias() const
unique identifier for this source.
bool isExist() const
Return whether valid stat info exists.
expected< T, E > inspect_err(expected< T, E > exp, Function &&f)
std::string asUserString() const
Translated error message as string suitable for the user.
RepoManagerRef _repoMgrRef
expected< void > assert_alias(const RepoInfo &info)
Pathname dirname() const
Return all but the last component od this path.
zypp::Pathname _productdatapath
MaybeAwaitable< expected< repo::RefreshCheckStatus > > checkIfToRefreshMetadata(repo::RefreshContextRef refCtx, LazyMediaHandle< Provide > medium, ProgressObserverRef progressObserver)
ProvideMediaHandle MediaHandle
static void setup(ProgressObserverRef progress, const std::string &label=std::string(), int steps=100)
MaybeAwaitable< expected< void > > refreshGeoIPData(ContextRef ctx, RepoInfo::url_set urls)
void updateSolvFileIndex(const Pathname &solvfile_r)
Create solv file content digest for zypper bash completion.
Writing the zypp history fileReference counted signleton for writhing the zypp history file...
bool isValid() const
Verifies the Url.
MaybeAwaitable< expected< zypp::repo::RepoType > > probeRepoType(ContextRef ctx, Provide::LazyMediaHandle medium, zypp::Pathname path, std::optional< zypp::Pathname > targetPath)
std::vector< std::string > Arguments
int unlink(const Pathname &path)
Like 'unlink'.
static const RepoType NONE
static expected success(ConsParams &&...params)
void resetDispose()
Set no dispose function.
int compareCI(const C_Str &lhs, const C_Str &rhs)
thrown if the user has no permission to update(write) the caches.
MaybeAwaitable< expected< repo::DownloadContextRef > > download(repo::DownloadContextRef dl, ProvideMediaHandle mediaHandle, ProgressObserverRef progressObserver=nullptr)
static const RepoType RPMMD
expected< RepoStatus > cacheStatus(const RepoInfo &info) const
#define ZYPP_CAUGHT(EXCPT)
Drops a logline telling the Exception was caught (in order to handle it).
zypp::RepoManagerFlags::CacheBuildPolicy _policy
zypp::RepoManagerFlags::RefreshCheckStatus RefreshCheckStatus
static const RepoType YAST2
expected< void > assert_urls(const RepoInfo &info)
static ProgressObserverRef makeSubTask(ProgressObserverRef parentProgress, float weight=1.0, const std::string &label=std::string(), int steps=100)
Base class for Exception.
Date timestamp() const
The time the data were changed the last time.
auto setProgress(ProgressObserverRef progressObserver, double progrValue, std::optional< std::string > newStr={})
Exception for repository handling.
SignalProxy< void()> sigReadyRead()
refresh is delayed due to settings
static expected< void > touchIndexFile(const RepoInfo &info, const RepoManagerOptions &options)
bool any_of(const Container &c, Fnc &&cb)
static Date now()
Return the current time.
MaybeAwaitable< expected< void > > addRepositories(RepoManagerRef mgr, zypp::Url url, ProgressObserverRef myProgress)
repo::RefreshContextRef _refCtx
std::string getPathName(EEncoding eflag=zypp::url::E_DECODED) const
Returns the path name from the URL.
Wrapper class for ::stat/::lstat.
static void finish(ProgressObserverRef progress, ProgressObserver::FinishResult result=ProgressObserver::Success)
ResultType and_then(const expected< T, E > &exp, Function &&f)
auto mtry(F &&f, Args &&...args)
static const RepoType RPMPLAINDIR
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.
MaybeAwaitable< expected< zypp::RepoStatus > > repoStatus(repo::DownloadContextRef dl, ProvideMediaHandle mediaHandle)
Track changing files or directories.
Repository already exists and some unique attribute can't be duplicated.
static zypp::repo::RepoType probeCache(const zypp::Pathname &path_r)
Probe Metadata in a local cache directory.
#define ZYPP_FWD_CURRENT_EXCPT()
Drops a logline and returns the current Exception as a std::exception_ptr.
Functor replacing repository variables.
int dirForEachExt(const Pathname &dir_r, const function< bool(const Pathname &, const DirEntry &)> &fnc_r)
Simiar to.
Easy-to use interface to the ZYPP dependency resolver.
MaybeAwaitable< expected< std::list< RepoInfo > > > readRepoFile(ContextRef ctx, zypp::Url repoFileUrl)
static auto copyResultToDest(ProvideRef provider, const zypp::Pathname &targetPath)
A smart container that manages a collection of MirroredOrigin objects, automatically grouping endpoin...
expected< zypp::Pathname > solv_path_for_repoinfo(const RepoManagerOptions &opt, const RepoInfo &info)
Calculates the solv cache path for a repository.
::zyppng::LazyMediaHandle< Provide > LazyMediaHandle
static expected< RepoStatus > metadataStatus(const RepoInfo &info, const RepoManagerOptions &options)
ZYppCommitResult & _result
Repository type enumeration.
xmlTextReader based interface to iterate xml streams.
zypp::ByteArray ByteArray
repo::RefreshContextRef _refreshContext