Author: lslezak Date: Mon Jan 3 17:53:29 2011 New Revision: 63064 URL: http://svn.opensuse.org/viewcvs/yast?rev=63064&view=rev Log: - don't abort when package checksum verification failes, ask to download the file again (bnc#657608) - 2.20.8 (partially reverted commit Modified: trunk/yast2/VERSION trunk/yast2/library/packages/src/PackageCallbacks.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=63064&r1=63063&r2=63064&view=diff ============================================================================== --- trunk/yast2/VERSION (original) +++ trunk/yast2/VERSION Mon Jan 3 17:53:29 2011 @@ -1 +1 @@ -2.20.7 +2.20.8 Modified: trunk/yast2/library/packages/src/PackageCallbacks.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/packages/src/PackageCallbacks.ycp?rev=63064&r1=63063&r2=63064&view=diff ============================================================================== --- trunk/yast2/library/packages/src/PackageCallbacks.ycp (original) +++ trunk/yast2/library/packages/src/PackageCallbacks.ycp Mon Jan 3 17:53:29 2011 @@ -305,7 +305,8 @@ */ global string DoneProvide (integer error, string reason, string name) { - y2milestone("DoneProvide: %1", error); + y2milestone("DoneProvide: %1, %2, %3", error, reason, name); + if (_provide_popup) { UI::CloseDialog(); @@ -318,11 +319,131 @@ CommandLine::PrintVerboseNoCR(clear_string); } - if (error != 0) + if (provide_aborted) { + provide_aborted = false; return "C"; } + // INVALID + if (error == 3) + { + // error message, %1 is a package name + string message = sformat(_("Package %1 is broken, integrity check has failed."), name); + + + if (Mode::commandline()) { + CommandLine::Print(message); + + // ask user in the interactive mode + if (CommandLine::Interactive()) + { + CommandLine::Print(""); + + // command line mode - ask user whether installation of the failed package should be retried + CommandLine::Print(_("Retry installation of the package?")); + + if (CommandLine::YesNo()) + { + // return Retry + return "R"; + } + + // command line mode - ask user whether the installation should be aborted + CommandLine::Print(_("Abort the installation?")); + if (CommandLine::YesNo()) + { + // return Abort + return "C"; + } + + // otherwise return Ignore (default) + return "I"; + } + + return "I"; + } + + term button_box = `ButtonBox ( + `PushButton (`id(`abort), `opt (`cancelButton, `key_F9), Label::AbortButton()), + `PushButton (`id(`retry), `opt (`customButton), Label::RetryButton()), + `PushButton (`id(`ignore), `opt (`okButton), Label::SkipButton()) + ); + + if ( showLongInfo ) + { + UI::OpenDialog( `opt(`decorated), LayoutPopup (message, button_box, 10, true) ); + UI::ReplaceWidget(`id(`info), `RichText (`opt(`plainText), sformat (_("Error: %1:"), error) + reason) ); + } + else + { + UI::OpenDialog( `opt(`decorated), LayoutPopup (message, button_box, vsize_no_details, false) ); + UI::ReplaceWidget(`id(`info), `Empty() ); + } + + any r = nil; + + repeat + { + r = UI::UserInput(); + if ( r == `show ) + { + showLongInfo = ShowLogInfo (message, button_box); + if (showLongInfo) + { + string error_symbol = "ERROR"; + + if (error == 1) + { + error_symbol = "NOT_FOUND"; + } + else if (error == 2) + { + error_symbol = "IO"; + } + else if (error == 3) + { + error_symbol = "INVALID"; + } + + UI::ReplaceWidget(`id(`info), + `RichText (`opt(`plainText), + // error message, %1 is code of the error, + // detail string is appended to the end + sformat (_("Error: %1:"), error_symbol) + reason) ); + } + else + { + UI::ReplaceWidget(`id(`info), `Empty() ); + } + } + } until (r == `abort || r == `retry || r == `ignore); + + y2milestone ("DoneProvide %1", r); + + UI::CloseDialog(); + + if (r == `abort) + return "C"; + if (r == `retry) + return "R"; + if (r == `ignore) + { + // don't show the warning when a refresh fails + if (!autorefreshing) + { + // TODO: add "Don't show again" checkbox + // a warning popup displayed after pressing [Ignore] after a download error + Popup::Warning(_("Ignoring a download failure may result in a broken system. +The system should be later verified by running the Software Management module.")); + } + + return "I"; + } + + y2error("Unknown user input: %1", r); + } + return "I"; } Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=63064&r1=63063&r2=63064&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Mon Jan 3 17:53:29 2011 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Mon Jan 3 16:49:18 UTC 2011 - lslezak@suse.cz + +- don't abort when package checksum verification failes, ask to + download the file again (bnc#657608) +- 2.20.8 + +------------------------------------------------------------------- Wed Dec 22 18:58:19 CET 2010 - mzugec@suse.cz - ifcfg-ethX.Y style config files for VLAN(fate#309240) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org