-------------------------------------------------------------------
+Thu Dec 11 17:13:06 CET 2008 - ma@suse.de
+
+- Catch and report media errors when proving packages. (bnc #457652)
+- revision 11926
+
+-------------------------------------------------------------------
Wed Dec 10 16:09:08 CET 2008 - ma@suse.de
- Remove obsolete zypp.conf::productsdir and deprecate
{
ret = doProvidePackage();
}
- catch ( const Exception & excpt )
+ catch ( const UserRequestException & excpt )
{
+ // UserRequestException e.g. from failOnChecksumError was already reported.
ERR << "Failed to provide Package " << _package << endl;
if ( ! _retry )
{
ZYPP_RETHROW( excpt );
}
}
+ catch ( const Exception & excpt )
+ {
+ ERR << "Failed to provide Package " << _package << endl;
+ if ( ! _retry )
+ {
+ // Aything else gets reported
+ std::string package_str = _package->name() + "-" + _package->edition().asString();
+
+ // TranslatorExplanation %s = name of the package being processed.
+ std::string detail_str( str::form(_("Failed to provide Package %s. Do you want to retry retrieval?"), package_str.c_str() ) );
+ detail_str += str::form( "\n\n%s\n%s", excpt.asUserString().c_str(), excpt.historyAsString().c_str() );
+
+ switch ( report()->problem( _package, repo::DownloadResolvableReport::IO, detail_str.c_str() ) )
+ {
+ case repo::DownloadResolvableReport::RETRY:
+ _retry = true;
+ break;
+ case repo::DownloadResolvableReport::IGNORE:
+ ZYPP_THROW(SkipRequestException("User requested skip of corrupted file"));
+ break;
+ case repo::DownloadResolvableReport::ABORT:
+ ZYPP_THROW(AbortRequestException("User requested to abort"));
+ break;
+ default:
+ ZYPP_RETHROW( excpt );
+ break;
+ }
+ }
+ }
} while ( _retry );
report()->finish( _package, repo::DownloadResolvableReport::NO_ERROR, std::string() );