Mailinglist Archive: opensuse-autoinstall (52 mails)

< Previous Next >
Problem with AutoInstallRules.ycp and merge.xslt
  • From: Luzian Scherrer <luzian@xxxxxxxxxxx>
  • Date: Fri, 2 Dec 2005 20:52:57 +0000 (UTC)
  • Message-id: <164B6551-C69B-4295-AE7E-8AECEDF6FF47@xxxxxxxxxxx>
Hello,

I think there is a typo in AutoInstallRules.ycp (version 1.34.4.9 that comes with SLES9 SP2): the xsltproc to merge classes is called with the following param there (line 733):

--param dontmerge \"'package, addon'\"

and I'm quite sure that it sould be:

--param dontmerge \"'package'\" --param dontmerge2 \"'addon'\"

The result of this typo is that neither <package> nor <addon> are correctly aggregated, which is the desired effect I believe and I also hope.

Quick demonstration:

idhpb02:/ # cat /tmp/a.xml
<?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">
<install>
<software>
<addons config:type="list">
<addon>addon-A</addon>
</addons>
<packages config:type="list">
<package>package-A</package>
</packages>
</software>
</install>
</profile>
idhpb02:/ # cat /tmp/b.xml
<?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">
<install>
<software>
<addons config:type="list">
<addon>addon-B</addon>
</addons>
<packages config:type="list">
<package>package-B</package>
</packages>
</software>
</install>
</profile>

Calling it the wrong way:

idhpb02:/ # xsltproc --novalid --param replace "'false'" --param dontmerge "'package, addon'" --param with "'/tmp/b.xml'" /usr/share/ autoinstall/xslt/merge.xslt /tmp/a.xml
<?xml version="1.0"?>
<ns1:profile xmlns:ns1="http://www.suse.com/1.0/yast2ns"; xmlns:config="http://www.suse.com/1.0/configns"; xmlns="http:// www.suse.com/1.0/yast2ns">
<ns1:install>
<ns1:software>
<ns1:addons config:type="list">
<ns1:addon>addon-B</ns1:addon>
</ns1:addons>
<ns1:packages config:type="list">
<ns1:package>package-B</ns1:package>
</ns1:packages>
</ns1:software>
</ns1:install>
</ns1:profile>

Calling it the (as I think) right way:

idhpb02:/ # xsltproc --novalid --param replace "'false'" --param dontmerge "'package'" --param dontmerge2 "'addon'" --param with "'/ tmp/b.xml'" /usr/share/autoinstall/xslt/merge.xslt /tmp/a.xml
<?xml version="1.0"?>
<ns1:profile xmlns:ns1="http://www.suse.com/1.0/yast2ns"; xmlns:config="http://www.suse.com/1.0/configns"; xmlns="http:// www.suse.com/1.0/yast2ns">
<ns1:install>
<ns1:software>
<ns1:addons config:type="list">
<ns1:addon>addon-A</ns1:addon><ns1:addon>addon-B</ns1:addon>
</ns1:addons>
<ns1:packages config:type="list">
<ns1:package>package-A</ns1:package><ns1:package>package-B</ ns1:package>
</ns1:packages>
</ns1:software>
</ns1:install>
</ns1:profile>


Could this be fixed? Or is it already known and possibly a workaround in existance?

Thanks in advance,
-Luzian



< Previous Next >