53 ,
_action( std::move(action_r) )
71 const Arch & arch_r )
const
104 template <
class TPackage>
132 if ( ! ( ret->empty() ||
_package->repoInfo().keepPackages() ) )
211 userData.
set(
"ResObject", roptr );
212 userData.
set(
"Package", roptr->asKind<
Package>() );
213 userData.
set(
"Localpath", file_r );
220 report()->pkgGpgCheck( userData );
231 WAR <<
"Unable to read package header from " << hr << endl;
235 std::string keyID = hr->signatureKeyID();
236 if ( keyID.length() > 0 ) {
237 if ( ! getZYpp()->keyRing()->provideAndImportKeyFromRepositoryWorkflow( keyID, info ) )
243 WAR <<
"packageSigCheck returned without setting providing missing key information" << endl;
251 if ( userData.
hasvalue(
"Action" ) )
255 else if ( userData.
haskey(
"Action" ) )
288 _target = getZYpp()->getTarget();
294 ret =
_target->rpmDb().checkPackageSignature( path_r, detail );
297 WAR <<
"Relax CHK_NOSIG: Config says unsigned packages are OK" << endl;
302 detail.push_back( RpmDb::CheckPackageDetail::value_type( ret,
"OOps. Target is not initialized!" ) );
304 userData.
set(
"CheckPackageResult", ret );
305 userData.
set(
"CheckPackageDetail", std::move(detail) );
317 WAR <<
_package->asUserString() <<
": " <<
"User requested to accept insecure file" << endl;
331 msg <<
_package->asUserString() <<
": " <<
_(
"Signature verification failed") <<
" " << ret;
332 if ( ! detail_r.empty() )
333 msg <<
"\n" << detail_r;
352 return shared_ptr<void>(
static_cast<void*
>(0),
353 bind( mem_fun_ref(
static_cast<void (shared_ptr<Report>::*)()
>(&shared_ptr<Report>::reset) ),
363 template <
class TPackage>
370 if ( ! ret->empty() )
372 MIL <<
"provided Package from cache " << _package <<
" at " << ret << endl;
373 report()->infoInCache( _package, ret );
378 RepoInfo info = _package->repoInfo();
386 if ( ! loc.checksum().empty() )
389 if ( pi.isExist() && loc.checksum() ==
CheckSum( loc.checksum().type(), std::ifstream( pi.c_str() ) ) )
391 report()->start( _package, pi.path().asFileUrl() );
392 const Pathname & dest( info.
packagesPath() / info.
path() / loc.filename() );
399 MIL <<
"provided Package from toplevel cache " << _package <<
" at " << ret << endl;
412 MIL <<
"provide Package " << _package << endl;
417 if ( ! ret->empty() )
422 report()->start( _package, url );
425 ret = doProvidePackage();
429 ERR <<
"Failed to provide Package " << _package << endl;
435 ERR <<
"Failed to provide Package " << _package << endl;
446 ZYPP_THROW(SkipRequestException(
"User requested skip of corrupted file"));
450 ZYPP_THROW(AbortRequestException(
"User requested to abort"));
457 ERR <<
"Failed to provide Package " << _package << endl;
460 const std::string & package_str = _package->asUserString();
468 ZYPP_THROW(SkipRequestException(
"User requested skip of corrupted file"));
472 ZYPP_THROW(AbortRequestException(
"User requested to abort"));
479 ERR <<
"Failed to provide Package " << _package << endl;
483 const std::string & package_str = _package->asUserString();
486 std::string detail_str(
str::form(
_(
"Failed to provide Package %s. Do you want to retry retrieval?"), package_str.c_str() ) );
495 ZYPP_THROW(SkipRequestException(
"User requested skip of file", excpt));
499 ZYPP_THROW(AbortRequestException(
"User requested to abort", excpt));
507 if ( ! ret->empty() )
513 MIL <<
"provided Package " << _package <<
" at " << ret << endl;
542 {
return report()->progressDeltaDownload( value ); }
545 {
return report()->progressDeltaApply( value ); }
562 std::list<DeltaRpm> deltaRpms;
567 for_( it, deltaRpms.begin(), deltaRpms.end())
569 DBG <<
"tryDelta " << *it << endl;
571 if ( ! ret->empty() )
604 report()->finishDeltaDownload();
606 report()->startDeltaApply( delta );
609 report()->problemDeltaApply(
_(
"applydeltarpm check failed.") );
614 Pathname cachedest(
_package->repoInfo().packagesPath() /
_package->repoInfo().path() /
_package->location().filename() );
615 Pathname builddest( cachedest.extend(
".drpm" ) );
620 report()->problemDeltaApply(
_(
"applydeltarpm failed.") );
624 report()->finishDeltaApply();
676 : _pimpl( factory::
make( access_r, pi_r, deltas_r, policy_r ) )
681 : _pimpl( factory::
make( access_r, pi_r, policy_r ) )
689 : _pimpl( factory::
make( access_r, package_r, deltas_r, policy_r ) )