install/add add-on product from command line/script

I have the SLE-11-SP3-SDK-DVD-i586-GM-DVD1.iso file on an NFS mount and I can manually use the yast UI to add this add-on of the SDK with this .iso file. However I want to do this from my automated scripts that create and setup my virtual servers.

From the command line, how can I add/install this SDK add-on product in this .iso file?

I tried adding this to my autoinst.xml:

<add_on_products config:type=“list”>

<media_url></media_url>
sle-sdk

</add_on_products>

AutoYast attempts to add/install the add-on but specifically reports that the add-on failed to install. I’m not surprised since the NFS mount is probably setup (by AutoYast) after AutoYast tries to add/install this SDK add-on product. I’m open having autoinst.xml do this task, but I actually have a preference to kick off this action later from bash script.

The highlights from the y2log-1 are:

2013-10-25 07:27:18 <1> linux(3070) [zypp] RepoManager.cc(probe):1229 going to probe the repo type at iso:///?iso=SLE-11-SP3-SDK-DVD-i586-GM-DVD1.iso&url=file:///home/castedo/macmnt/repo/ ()
2013-10-25 07:27:18 <1> linux(3070) [zypp++] MediaSetAccess.cc(rewriteUrl):392 Rewriting url iso:///?iso=SLE-11-SP3-SDK-DVD-i586-GM-DVD1.iso&url=file:///home/castedo/macmnt/repo/
2013-10-25 07:27:18 <1> linux(3070) [zypp++] MediaSetAccess.cc(rewriteUrl):408 Url rewrite result: iso:///?iso=SLE-11-SP3-SDK-DVD-i586-GM-DVD1.iso&url=file:///home/castedo/macmnt/repo/
2013-10-25 07:27:18 <1> linux(3070) [zypp] MediaAccess.cc(open):118 Trying scheme ‘iso’
2013-10-25 07:27:18 <1> linux(3070) [zypp] MediaISO.cc(MediaISO):54 MediaISO::MediaISO(iso:///?iso=SLE-11-SP3-SDK-DVD-i586-GM-DVD1.iso&url=file:///home/castedo/macmnt/repo/, )
2013-10-25 07:27:18 <1> linux(3070) [zypp] MediaAccess.cc(open):118 Trying scheme ‘file’
2013-10-25 07:27:18 <1> linux(3070) [zypp] MediaDIR.cc(MediaDIR):48 MediaDIR::MediaDIR(file:/home/castedo/macmnt/repo/)
2013-10-25 07:27:18 <1> linux(3070) [zypp] MediaAccess.cc(open):234 Opened: file(file:/home/castedo/macmnt/repo/ not attached; localRoot “”)

2013-10-25 07:27:18 <5> linux(3070) [zypp] Exception.cc(log):137 MediaDIR.cc(attachTo):88 THROW: Specified path ‘/home/castedo/macmnt/repo/’ is not a directory: file:/home/castedo/macmnt/repo/

2013-10-25 07:27:18 <3> linux(3070) [YCP] Report.ycp:523 Failed to add add-on product.

You could try mounting the NFS share in a pre-install script. See section 4.16.1 at
https://www.suse.com/documentation/sles11/singlehtml/book_autoyast/book_autoyast.html

I’ve never tried referencing an iso in an AutoYaST myself and am not in a position to try it right now. I have the SDK packages in a local repo accessible via http and reference that in my AutoYaST profile.