23 template<
typename DlContextRefType,
typename MediaHandle>
24 auto statusLogic( DlContextRefType &&
ctx, MediaHandle mediaHandle ) {
25 constexpr bool isAsync = std::is_same_v<DlContextRefType,repo::AsyncDownloadContextRef>;
28 if ( !mediaHandle.localPath().has_value() ) {
33 const auto &repoInfo = std::forward<DlContextRefType>(
ctx)->repoInfo();
51 template<
typename DlContextRefType,
typename MediaHandle>
54 constexpr bool isAsync = std::is_same_v<DlContextRefType,repo::AsyncDownloadContextRef>;
59 if ( !mediaHandle.localPath().has_value() ) {
63 if ( progressObserver ) progressObserver->inc();
66 const auto &repoInfo = std::forward<DlContextRefType>(ctx)->repoInfo();
67 auto newstatus =
zypp::RepoStatus( mediaHandle.localPath().value() / repoInfo.path() );
69 zypp::Pathname productpath( std::forward<DlContextRefType>(ctx)->destDir() / repoInfo.path() );
71 newstatus.saveToCookieFile( productpath/
"cookie" );
73 if ( progressObserver ) progressObserver->setFinished();
77 return makeReadyResult<Ret, isAsync>( Ret::error(
ZYPP_EXCPT_PTR(e) ) );
79 return makeReadyResult<Ret, isAsync>( Ret::error( std::current_exception() ) );
81 return makeReadyResult<Ret, isAsync>( Ret::success( std::forward<DlContextRefType>(ctx) ) );
Track changing files or directories.