Author: mlandres Date: Thu Dec 11 17:16:23 2008 New Revision: 11926 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11926&view=rev Log: - Catch and report media errors when proving packages. (bnc #457652) Modified: trunk/libzypp/VERSION.cmake trunk/libzypp/package/libzypp.changes trunk/libzypp/zypp/repo/PackageProvider.cc Modified: trunk/libzypp/VERSION.cmake URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=11926&r1=11925&r2=11926&view=diff ============================================================================== --- trunk/libzypp/VERSION.cmake (original) +++ trunk/libzypp/VERSION.cmake Thu Dec 11 17:16:23 2008 @@ -61,7 +61,7 @@ SET(LIBZYPP_MAJOR "5") SET(LIBZYPP_COMPATMINOR "23") SET(LIBZYPP_MINOR "24") -SET(LIBZYPP_PATCH "7") +SET(LIBZYPP_PATCH "8") # # LAST RELEASED: 5.24.7 (23) # (The number in parenthesis is LIBZYPP_COMPATMINOR) Modified: trunk/libzypp/package/libzypp.changes URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=11926&r1=11925&r2=11926&view=diff ============================================================================== --- trunk/libzypp/package/libzypp.changes (original) +++ trunk/libzypp/package/libzypp.changes Thu Dec 11 17:16:23 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +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 Modified: trunk/libzypp/zypp/repo/PackageProvider.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/PackageProvider.cc?rev=11926&r1=11925&r2=11926&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/PackageProvider.cc (original) +++ trunk/libzypp/zypp/repo/PackageProvider.cc Thu Dec 11 17:16:23 2008 @@ -103,14 +103,44 @@ { 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() ); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org