21#include <zypp-core/ng/pipelines/Expected>
22#include <zypp-media/FileCheckException>
24#include <zypp/ng/UserRequest>
52 MIL <<
"File " <<
_file <<
" has no checksum available." << std::endl;
54 MIL <<
"User accepted " <<
_file <<
" with no checksum." << std::endl;
74 static std::map<std::string,std::string> exceptions;
80 WAR <<
"File " <<
_file <<
" has wrong checksum " << real_checksum <<
" (expected " <<
_checksum <<
")" << std::endl;
81 if ( !exceptions.empty() && exceptions[real_checksum.checksum()] ==
_checksum.checksum() )
83 WAR <<
"User accepted " <<
_file <<
" with WRONG CHECKSUM. (remembered)" << std::endl;
86 else if (
_report.askUserToAcceptWrongDigest(
_file,
_checksum.checksum(), real_checksum.checksum() ) )
88 WAR <<
"User accepted " <<
_file <<
" with WRONG CHECKSUM." << std::endl;
89 exceptions[real_checksum.checksum()] =
_checksum.checksum();
114 zypp_co_return zypp_co_await( impl.
execute() );
119 using zyppng::operators::operator|;
#define ZYPP_EXCPT_PTR(EXCPT)
Drops a logline and returns Exception as a std::exception_ptr.
Store and operate on date (time_t).
static const ValueType hour
static Date now()
Return the current time.
static expected success(ConsParams &&...params)
static expected error(ConsParams &&...params)
MaybeAwaitable< expected< void > > verifyChecksum(ContextRef zyppCtx, zypp::CheckSum checksum, zypp::filesystem::Pathname file)
std::function< MaybeAwaitable< expected< ProvideRes > >(ProvideRes &&)> checksumFileChecker(ContextRef zyppCtx, zypp::CheckSum checksum)
typename ProvideType::Res ProvideRes
DigestReportHelper _report
typename ProvideType::MediaHandle MediaHandle
CheckSumWorkflowLogic(ContextRef zyppContext, zypp::CheckSum &&checksum, zypp::Pathname file)
typename Context::ProvideType ProvideType