Author: locilka
Date: Wed Jan 28 14:35:57 2009
New Revision: 55115
URL: http://svn.opensuse.org/viewcvs/yast?rev=55115&view=rev
Log:
- Added new InstError module for unified reporting of errors
during installation.
Added:
trunk/installation/src/modules/InstError.ycp
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_finish.ycp
trunk/installation/src/include/scr_switch_debugger.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=55115&r1=55114&r2=55115&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Wed Jan 28 14:35:57 2009
@@ -1,9 +1,15 @@
-------------------------------------------------------------------
+Wed Jan 28 14:33:09 CET 2009 - locilka@suse.cz
+
+- Added new InstError module for unified reporting of errors
+ during installation.
+- 2.18.3
+
+-------------------------------------------------------------------
Tue Jan 27 17:13:57 CET 2009 - locilka@suse.cz
- Added test for checking free space when SCR switch fails
(bnc #460477).
-- 2.18.3
-------------------------------------------------------------------
Mon Jan 26 13:58:00 CET 2009 - locilka@suse.cz
Modified: trunk/installation/src/clients/inst_finish.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_finish.ycp?rev=55115&r1=55114&r2=55115&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_finish.ycp (original)
+++ trunk/installation/src/clients/inst_finish.ycp Wed Jan 28 14:35:57 2009
@@ -28,6 +28,7 @@
import "GetInstArgs";
import "ProductFeatures";
import "SlideShow";
+ import "InstError";
// added for fate# 303395
import "Directory";
@@ -37,6 +38,17 @@
boolean test_mode = false;
+ void ReportClientError (string client_error_text) {
+ // get the latest errors
+ map cmd = (map) SCR::Execute (.local.bash_output, "tail -n 200 /var/log/YaST2/y2log | grep ' <\(3\|5\)> '");
+
+ InstError::ShowErrorPopUp (
+ _("Installation Error"),
+ client_error_text,
+ (cmd["exit"]:-1 == 0 && cmd["stdout"]:"" != "" ? cmd["stdout"]:"" : nil)
+ );
+ }
+
if (size (WFM::Args()) > 0 && is (WFM::Args(0), string)) {
y2milestone ("Args: %1", WFM::Args());
if (WFM::Args(0) == "test")
@@ -237,6 +249,7 @@
if (info == nil) {
y2error ("Client %1 returned invalid data", s);
+ ReportClientError (sformat ("Client %1 returned invalid data.", s));
return nil;
}
Modified: trunk/installation/src/include/scr_switch_debugger.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/include/scr_switch_debugger.ycp?rev=55115&r1=55114&r2=55115&view=diff
==============================================================================
--- trunk/installation/src/include/scr_switch_debugger.ycp (original)
+++ trunk/installation/src/include/scr_switch_debugger.ycp Wed Jan 28 14:35:57 2009
@@ -114,7 +114,7 @@
"/var/log/YaST2/y2log",
"http://bugzilla.novell.com/",
"/var/log/YaST2/",
- // link to the Yast Bug Reporting HOWT
+ // link to the Yast Bug Reporting HOWTO
// for translators: use the localized page for your language if it exists,
// check the combo box "In other laguages" on top of the page
_("http://en.opensuse.org/Bugs/YaST")
@@ -331,7 +331,7 @@
_("Checking for free space in the %1 directory: %2"),
partition,
// linked to the text above (sometimes replaces the '%2')
- (free_space < 0 ? _("Unable to find out"):String::FormatSize (free_space)),
+ (free_space < 0 ? _("Unable to find out"):String::FormatSize (free_space))
),
this_test
);
Added: trunk/installation/src/modules/InstError.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/modules/InstError.ycp?rev=55115&view=auto
==============================================================================
--- trunk/installation/src/modules/InstError.ycp (added)
+++ trunk/installation/src/modules/InstError.ycp Wed Jan 28 14:35:57 2009
@@ -0,0 +1,72 @@
+/**
+ * File: modules/InstError.ycp
+ * Package: Installation
+ * Summary: Module for reporting installation errors
+ * Authors: Lukas Ocilka