10#include <zypp-core/zyppng/ui/ProgressObserver>
11#include <zypp-media/ng/ProvideSpec>
12#include <zypp/ng/Context>
27 template<
class Executor,
class OpType>
28 struct StatusLogic :
public LogicBase<Executor, OpType>{
34 using ZyppContextType =
typename DlContextRefType::element_type::ContextType;
35 using ProvideType =
typename ZyppContextType::ProvideType;
36 using MediaHandle =
typename ProvideType::MediaHandle;
39 StatusLogic( DlContextRefType
ctx, MediaHandle &&media )
53 if ( !status.
empty() &&
_ctx->repoInfo ().requireStatusWithMediaFile()) {
86 template<
class Executor,
class OpType>
93 using ZyppContextType =
typename DlContextRefType::element_type::ContextType;
94 using ProvideType =
typename ZyppContextType::ProvideType;
95 using MediaHandle =
typename ProvideType::MediaHandle;
98 DlLogic( DlContextRefType
ctx, MediaHandle &&mediaHandle, ProgressObserverRef &&
progressObserver )
99 :
zypp::repo::yum::RepomdFileCollector(
ctx->destDir() )
111 if ( mediaInfo )
_ctx->files().push_back ( std::move(mediaInfo.get()) );
117 |
and_then( [
this] ( DlContextRefType && ) {
126 ZYPP_THROW(zypp::repo::RepoException( _ctx->repoInfo(),
"Repo can only require metadata files from primary medium."));
155 return _ctx->repoInfo();
159 return _ctx->deltaDir();
162 DlContextRefType
_ctx;
Interface of repomd.xml file reader.
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
What is known about a repository.
Track changing files or directories.
bool empty() const
Whether the status is empty (empty checksum)
Reads through a repomd.xml file and collects type, location, checksum and other data about metadata f...
A ProvideRes object is a reference counted ownership of a resource in the cache provided by a Provide...
static expected success(ConsParams &&...params)
#define ZYPP_ENABLE_LOGIC_BASE(Executor, OpType)
typename conditional< B, T, F >::type conditional_t
Easy-to use interface to the ZYPP dependency resolver.
AsyncOpRef< expected< zypp::ManagedFile > > provideToCacheDir(AsyncCacheProviderContextRef cacheContext, ProvideMediaHandle medium, zypp::Pathname file, ProvideFileSpec filespec)
AsyncOpRef< expected< repo::AsyncDownloadContextRef > > downloadMasterIndex(repo::AsyncDownloadContextRef dl, ProvideMediaHandle mediaHandle, zypp::filesystem::Pathname masterIndex_r)
auto downloadMediaInfo(MediaHandle &&mediaHandle, const zypp::filesystem::Pathname &destdir)
Downloader workspace for YUM (rpm-nmd) repositories Encapsulates all the knowledge of which files hav...
AsyncOpRef< expected< repo::AsyncDownloadContextRef > > download(repo::AsyncDownloadContextRef dl, ProvideMediaHandle mediaHandle, ProgressObserverRef progressObserver)
AsyncOpRef< expected< zypp::RepoStatus > > repoStatus(repo::AsyncDownloadContextRef dl, ProvideMediaHandle mediaHandle)
auto transform_collect(Transformation &&f)
auto and_then(Fun &&function)
auto finishProgress(ProgressObserverRef progressObserver)
detail::collect_helper collect()
auto incProgress(ProgressObserverRef progressObserver, double progrIncrease=1.0, std::optional< std::string > newStr={})
auto inspect(Fun &&function)
std::conditional_t< isAsync, AsyncOpRef< T >, T > makeReadyResult(T &&result)
static expected< std::decay_t< Type >, Err > make_expected_success(Type &&t)
ProgressObserverRef _progressObserver
Helper filtering the files offered by a RepomdFileReader.