Package Update

josef Reidinger jreidinger at suse.com
Mon Mar 15 10:00:57 UTC 2021


On Fri, 12 Mar 2021 20:33:52 -0300 (BRT)
Luiz Angelo Daros de Luca <luizluca at tre-sc.jus.br> wrote:

> The new "validator" will still give us a lot of pain. 

Hi Luiz,
main goal of new validator is early catch of issues in autoyast profile so you do not waste time with invalid profile. As you can read in previous reply you can also disable it.
Now let me give a bit inside what happens here:

> 
> It would be nice to test every example config: 
> 
> <?xml version="1.0" encoding="UTF-8"?> 
> <!DOCTYPE profile> 
> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> 
> <general> 
> <semi-automatic config:type="list"> 
> <semi-automatic_entry>networking</semi-automatic_entry> 
> <semi-automatic_entry>scc</semi-automatic_entry> 
> <semi-automatic_entry>partitioning</semi-automatic_entry> 
> </semi-automatic> 
> </general> 
> </profile> 
> https://documentation.suse.com/sles/15-SP2/single-html/SLES-autoyast/index.html#CreateProfile-General-semi-automatic 
> 

It is in fact bug in documentation, as it was always "module" as child element, but both options works. Why? Because parser for child of element that has type "list" ignores name and just parse its value.

> xmllint returns a very limited diagnostic answer: 
> 
> xmllint --noout --relaxng /usr/share/YaST2/schema/autoyast/rng/profile.rng test 
> test :4: element general: Relax-NG validity error : Element profile has extra content: general 
> test fails to validate 

I think even in error report suggestion is to use jing as validator to get better error message. Sadly we cannot use it directly in installer as it is java based and we do not have space/RAM for running it in installation.

> 
> Reading profile.rng, it looks like "semi-automatic_entry" does not exist anymore and now it is "module". 

As said before it was that way always in schema, just bug in documentation.
Good part is that we are now discussion to allow both in schema as both works and it is already in documentation.
> 
> We have autoyast syntax changes, an enforced syntax validator, no updated doc and a very limited diagnostic answer. 
> I'm doing some fixes in my autoyast profiles based mostly on trial and error and manual bisect. It's taking a lot of time, 
> specially for items deep inside the tree. 

I suggest to just use yast2-schema package and run jing on your profile to get quick xml schema validation as profile the fastest way to adapt autoyast profile.

Josef

> 
> Regards, 
> 



More information about the sle-beta mailing list