26 template<
typename DlContextRefType,
typename MediaHandle>
27 auto statusLogic( DlContextRefType &&
ctx, MediaHandle mediaHandle ) {
28 constexpr bool isAsync = std::is_same_v<DlContextRefType,repo::AsyncDownloadContextRef>;
31 if ( !mediaHandle.localPath().has_value() ) {
36 const auto &repoInfo = std::forward<DlContextRefType>(
ctx)->repoInfo();
54 template<
typename DlContextRefType,
typename MediaHandle>
57 constexpr bool isAsync = std::is_same_v<DlContextRefType,repo::AsyncDownloadContextRef>;
62 if ( !mediaHandle.localPath().has_value() ) {
66 if ( progressObserver ) progressObserver->inc();
69 const auto &repoInfo = std::forward<DlContextRefType>(ctx)->repoInfo();
70 auto newstatus =
zypp::RepoStatus( mediaHandle.localPath().value() / repoInfo.path() );
72 zypp::Pathname productpath( std::forward<DlContextRefType>(ctx)->destDir() / repoInfo.path() );
74 newstatus.saveToCookieFile( productpath/
"cookie" );
76 if ( progressObserver ) progressObserver->setFinished();
84 return makeReadyResult<Ret, isAsync>( Ret::success( std::forward<DlContextRefType>(ctx) ) );
Track changing files or directories.