From: Jan Kupec Date: Mon, 18 Dec 2006 12:17:00 +0000 (+0000) Subject: fixed bug #224216 (uncaught checksum exception) (minimal fix for 10.2 YOU, more work... X-Git-Tag: BASE-SuSE-Linux-10_3-Branch~369 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ab8aaabd35af3864ad09c7e8950b6e251cea0ab;p=platform%2Fupstream%2Fzypper.git fixed bug #224216 (uncaught checksum exception) (minimal fix for 10.2 YOU, more work needed for 10.3) --- diff --git a/src/zmart-misc.cc b/src/zmart-misc.cc index 7362255..6aafb83 100644 --- a/src/zmart-misc.cc +++ b/src/zmart-misc.cc @@ -711,10 +711,33 @@ int solve_and_commit (bool non_interactive) { if (!confirm_licenses(non_interactive)) return ZYPPER_EXIT_OK; cerr_v << "committing" << endl; - ZYppCommitResult result = God->commit( ZYppCommitPolicy() ); - if (!result._errors.empty()) - retv = ZYPPER_EXIT_ERR_ZYPP; - cerr_v << result << std::endl; + + try { + ZYppCommitResult result = God->commit( ZYppCommitPolicy() ); + + if (!result._errors.empty()) + retv = ZYPPER_EXIT_ERR_ZYPP; + + cerr_v << result << std::endl; + } + catch ( const Exception & excpt_r ) { + ZYPP_CAUGHT( excpt_r ); + + // special handling for failed integrity exception + if (excpt_r.msg().find("fails integrity check") != string::npos) { + cerr << endl + << _("Package integrity check failed. This may be a problem" + " with installation source or media. Try one of the following:\n" + "\n" + "- just retry previous command\n" + "- refresh installation sources using 'zypper refresh'\n" + "- use another installation media (if e.g. damaged)\n" + "- use another installation source") << endl; + return ZYPPER_EXIT_ERR_ZYPP; + } + else + ZYPP_RETHROW( excpt_r ); + } } } diff --git a/src/zmart-source-callbacks.h b/src/zmart-source-callbacks.h index e24c6c1..538fd94 100644 --- a/src/zmart-source-callbacks.h +++ b/src/zmart-source-callbacks.h @@ -192,6 +192,7 @@ struct DownloadResolvableReportReceiver : public zypp::callback::ReceiveReport