Bug 216924

Summary: Language - Expression evaluates to nil
Product: [openSUSE] openSUSE 10.2 Reporter: Lukas Ocilka <locilka>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED INVALID QA Contact: Jiri Srain <jsrain>
Severity: Minor    
Priority: P5 - None    
Version: Beta 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Lukas Ocilka 2006-11-01 10:09:49 UTC
Please, use this patch, at least because of testsuites.

Index: language/src/modules/Language.ycp
===================================================================
--- language/src/modules/Language.ycp   (revision 33943)
+++ language/src/modules/Language.ycp   (working copy)
@@ -450,7 +450,11 @@
        QuickSet (local_lang);
        SetDefault();           // also default
     }
-    if (SCR::Read (.target.size, "/etc/sysconfig/language") > 0)
+    integer lang_size = (integer) SCR::Read (.target.size, "/etc/sysconfig/language");
+    if (lang_size == nil) {
+       y2error ("No such file '%1'", "/etc/sysconfig/language");
+    }
+    else if (lang_size > 0)
     {
        ReadSysconfigValues ();
     }
Comment 1 Lukas Ocilka 2006-11-01 14:34:05 UTC
I've changed my mind.

SCR::Read (.target.size, ...) should return -1 when it is not running in the testsuite. In testsuite it probably returns 'nil' and it's better to have this information...

closing as INVALID