Hi I have a problem merging classe with YaST in SuSE 9.0. If I have the following file <?xml version="1.0"?> <!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd"> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <configure> <inetd> <last_created config:type="integer">0</last_created> <netd_conf config:type="list"> <conf> <protocol>udp</protocol> <script>tftp</script> <server>/usr/sbin/in.tftpd</server> <service>tftp</service> </conf> </netd_conf> <netd_service config:type="symbol">xinetd</netd_service> <netd_status config:type="integer">0</netd_status> </inetd> <tftp-server> <start_tftpd config:type="boolean">true</start_tftpd> <tftp_directory>/tftpboot</tftp_directory> </tftp-server> </configure> </profile> and merged with the following file using AutoYaST <?xml version="1.0"?> <!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd"> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <configure> <inetd> <last_created config:type="integer">0</last_created> <netd_conf config:type="list"> <conf> <protocol>tcp</protocol> <script>finger</script> <server>/usr/sbin/in.fingerd</server> <service>finger</service> </conf> </netd_conf> <netd_service config:type="symbol">xinetd</netd_service> <netd_status config:type="integer">0</netd_status> </inetd> </configure> </profile> The resulting file was <?xml version="1.0"?> <!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd"> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <configure> <inetd> <last_created config:type="integer">0</last_created> <netd_conf config:type="list"> <conf> <protocol>tcp</protocol> <script>finger</script> <server>/usr/sbin/in.fingerd</server> <service>finger</service> </conf> </netd_conf> <netd_service config:type="symbol">xinetd</netd_service> <netd_status config:type="integer">0</netd_status> </inetd> <tftp-server> <start_tftpd config:type="boolean">true</start_tftpd> <tftp_directory>/tftpboot</tftp_directory> </tftp-server> </configure> </profile> So the xinetd configuration for the tftp server is not contained in the result. Why? Thanks, Thomas
Thomas Necker wrote:
Hi
I have a problem merging classe with YaST in SuSE 9.0.
If I have the following file
<?xml version="1.0"?> <!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd"> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <configure> <inetd> <last_created config:type="integer">0</last_created> <netd_conf config:type="list"> <conf> <protocol>udp</protocol> <script>tftp</script> <server>/usr/sbin/in.tftpd</server> <service>tftp</service> </conf> </netd_conf> <netd_service config:type="symbol">xinetd</netd_service> <netd_status config:type="integer">0</netd_status> </inetd> <tftp-server> <start_tftpd config:type="boolean">true</start_tftpd> <tftp_directory>/tftpboot</tftp_directory> </tftp-server> </configure> </profile>
and merged with the following file using AutoYaST
<?xml version="1.0"?> <!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd"> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <configure> <inetd> <last_created config:type="integer">0</last_created> <netd_conf config:type="list"> <conf> <protocol>tcp</protocol> <script>finger</script> <server>/usr/sbin/in.fingerd</server> <service>finger</service> </conf> </netd_conf> <netd_service config:type="symbol">xinetd</netd_service> <netd_status config:type="integer">0</netd_status> </inetd> </configure> </profile>
The resulting file was
<?xml version="1.0"?> <!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd"> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <configure> <inetd> <last_created config:type="integer">0</last_created> <netd_conf config:type="list"> <conf> <protocol>tcp</protocol> <script>finger</script> <server>/usr/sbin/in.fingerd</server> <service>finger</service> </conf> </netd_conf> <netd_service config:type="symbol">xinetd</netd_service> <netd_status config:type="integer">0</netd_status> </inetd> <tftp-server> <start_tftpd config:type="boolean">true</start_tftpd> <tftp_directory>/tftpboot</tftp_directory> </tftp-server> </configure> </profile>
So the xinetd configuration for the tftp server is not contained in the result. Why?
It is merged, one configuration did overwrite the other one, however, to have both list entries, you dont want to merge the "conf" enteries. This is a general problem with lists, it cant be handled automatically. Sometimes you want the whole configuration in a list to be replaces, in this case you want them to be "added". The merge style sheet can handle this, however only for one element in 9.0. See /usr/share/autoinstall/xslt/merge.xslt the parameter is dontmerge. In /usr/share/YaST2/modules/AutoinstClass.ycp line 67 dontmerge is set to "addon" which is for the package selections, if you change that to "conf" it will not merge the conf files in the examples above. I fixed that for upcoming releases to handle some more dontmerge parameters which can be configured by the user... Anas
Thanks, Thomas
participants (2)
-
Anas Nashif
-
Thomas Necker