[Bug 418648] New: yast2-x11: exported xml config fails to validate against schema
https://bugzilla.novell.com/show_bug.cgi?id=418648 User sschober@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=418648#c307967 Summary: yast2-x11: exported xml config fails to validate against schema Product: openSUSE 11.1 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: AutoYaST AssignedTo: jdsn@novell.com ReportedBy: sschober@novell.com QAContact: qa@suse.de Found By: --- The yast2-x11 module produces the following code on (autoyast) export: <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <x11> <!-- ... --> <color_depth config:type="integer">24</color_depth> <!-- ... --> </x11> </profile> This fails to validate against the x11.rnc schema included in the module, which states 'color_depth' should be of type integer: color_depth = element color_depth { INTEGER } The easy solution, i think, would be to change this to '{ text }', but 'integer' appears to be the more fitting type. A quick look at the code in <yast-svn>/x11/src/autoyast/modules/AutoinstX11.ycp revealed the following statement: 144 x11["color_depth"] = (string) XLib::getActiveColorDepth(); Which might, according to my very basic understanding of the code, be changed to: 144 x11["color_depth"] = tointeger(XLib::getActiveColorDepth()); This might also remove the need for the cast in line 187: 186 // convert value to integer (bnc#307967) 187 integer colors = tointeger(x11["color_depth"]:16); -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=418648 User jdsn@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=418648#c1 J. Daniel Schmidt <jdsn@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |sschober@novell.com Priority|P5 - None |P4 - Low --- Comment #1 from J. Daniel Schmidt <jdsn@novell.com> 2008-08-22 11:02:54 MDT --- Bascically yes, I could change this parameter to string. But this would immediately invalidate every existing profiles. So this should be the very last option. The conversion of this integer value is done because SaX needs a string to set things up. A much more interesting question is, why your profile did not validate. 24 looks like an integer value to me. There are even other values in the x11 autoyast profile using the type integer - so my guess is, that you hit a different error. Could you please attach your logs and the complete AutoYaST profile, that did not validate. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=418648 User sschober@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=418648#c2 --- Comment #2 from Sven Schober <sschober@novell.com> 2008-09-01 09:43:00 MDT --- Created an attachment (id=236601) --> (https://bugzilla.novell.com/attachment.cgi?id=236601) Fix for wrong color_depth type. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=418648 User sschober@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=418648#c3 Sven Schober <sschober@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ug@novell.com Status|NEEDINFO |NEW Info Provider|sschober@novell.com | --- Comment #3 from Sven Schober <sschober@novell.com> 2008-09-01 09:52:53 MDT --- I'm sorry, my pasted profile xml-snipped was poorly chosen and actually caused more confusion than clarity :/ I didn't want you to change from "string" to "integer", but the other way round. In my snipped the type actually _was_ integer. Investigating the issue a bit further i found that only _cloning_ an existing system caused an invalid profile (i.e. <color_depth>24</color_depth>). Manually configuring the x11 settings via the GUI resulted in a correct profile (<color_depth config:type="integer">24</color_depth>). The attachement in comment #2 fixes this issue. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=418648 User jdsn@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=418648#c4 J. Daniel Schmidt <jdsn@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #4 from J. Daniel Schmidt <jdsn@novell.com> 2008-09-01 12:22:53 MDT --- I'm sorry too, the initial report confused me a little. Now I got your point and you are totally right. Thanks for the patch. Fixed version will be submitted soon for Code11. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com