AutoYaST: splitting up config files

OK, AutoYaST has some nice features. But it's an evil beast. Handling the XML files is horrible, and documentation is not exactly elaborate. In my quest to eliminate duplication between the various installation profiles, I found out the following snippets of wisdom.

includes

Files can be included by adding XInclude as a namespace to the profile tag in the control file.
<?xml version="1.0"?>
<!DOCTYPE profile>
<profile
    xmlns="http://www.suse.com/1.0/yast2ns"
    xmlns:config="http://www.suse.com/1.0/configns"
    xmlns:xi="http://www.w3.org/2001/XInclude">

    <xi:include href="http://server/path/to/some/file.xml" />
    <xi:include href="http://server/path/to/some/otherfile.xml" />
</profile>
	

classes

Classes seem to be little more than includes, but they have the big advantage that setting from different files can be merged together.

This is how it works:

To merge two <software> tags via classes, the following snippet is needed within the <class> below the class with the first occurence of <software> (in the class that will be merged in).
	  <dont_merge config:type="list">
	      <element>package</element>
	  </dont_merge>
	

rules

Licensed under the Creative Commons Attribution-Share Alike 3.0 License.