This is for SLES 11 SP1 SDK DVD support
==================================================================== Target Dist: SLES 11 SP1, for both full install and statelite install Aim: To enable users to install packages from SDK DVD during installation user impact: If the user add packages in .pkglist files, he/she should first do 'copycds' using SDK DVD iso. By-effect: N/A Limitations: 2nd installation DVD and 2nd SDK DVD not supported, both carries source packages. It seems they are not recognized by autoyast, and it's of no use to install sources pkgs on CNs. ==================================================================== git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9939 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
c20ff029c6
commit
04cb7483c6
@ -29,6 +29,7 @@ sub subvars {
|
||||
$tmplerr=undef; #clear tmplerr since we are starting fresh
|
||||
$node = shift;
|
||||
my $pkglistfile=shift;
|
||||
my $media_dir = shift;
|
||||
|
||||
my $outh;
|
||||
my $inh;
|
||||
@ -115,7 +116,17 @@ sub subvars {
|
||||
$inc =~ s/#INCLUDE:([^#^\n]+)#/includefile($1, 0, 0)/eg;
|
||||
$inc =~ s/#HOSTNAME#/$node/eg;
|
||||
|
||||
if($media_dir =~ /sles11/){
|
||||
my $nrtab = xCAT::Table->new("noderes");
|
||||
my $tftpserver = $nrtab->getNodeAttribs($node, ['tftpserver']);
|
||||
my $sles_sdk_media = "http://" . $tftpserver->{tftpserver} . $media_dir . "/1";
|
||||
|
||||
system("find $media_dir|grep sdk1");
|
||||
if($? == 0){
|
||||
$sles_sdk_media =~ s/1$/sdk1/g;
|
||||
}
|
||||
$inc =~ s/#SLES_SDK_MEDIA#/$sles_sdk_media/eg;
|
||||
}
|
||||
if ($tmplerr) {
|
||||
close ($outh);
|
||||
return $tmplerr;
|
||||
|
@ -671,7 +671,8 @@ sub mkinstall
|
||||
$tmplfile,
|
||||
"$installroot/autoinst/$node",
|
||||
$node,
|
||||
$pkglistfile
|
||||
$pkglistfile,
|
||||
$pkgdir
|
||||
);
|
||||
}
|
||||
|
||||
@ -981,7 +982,7 @@ sub copycd
|
||||
my $prod = <$mfile>;
|
||||
close($mfile);
|
||||
|
||||
if ($prod =~ m/SUSE-Linux-Enterprise-Server/)
|
||||
if ($prod =~ m/SUSE-Linux-Enterprise-Server/ || $prod =~ m/SUSE-Linux-Enterprise-Software-Development-Kit/)
|
||||
{
|
||||
if (-f "$path/content") {
|
||||
my $content;
|
||||
@ -1001,6 +1002,9 @@ sub copycd
|
||||
$detdistname = "sles" . $subparts[0];
|
||||
unless ($distname) { $distname = "sles" . $subparts[0] };
|
||||
}
|
||||
if($prod =~ m/Software-Development-Kit/) {
|
||||
$discnumber = 'sdk' . $discnumber;
|
||||
}
|
||||
# check media.1/products for text.
|
||||
# the cselx is a special GE built version.
|
||||
# openSUSE is the normal one.
|
||||
|
@ -29,6 +29,17 @@
|
||||
<id>non</id>
|
||||
</mouse>
|
||||
</general>
|
||||
<add-on>
|
||||
<add_on_products config:type="list">
|
||||
<listentry>
|
||||
<media_url>#SLES_SDK_MEDIA#</media_url>
|
||||
<product>SuSE-Linux-SDK</product>
|
||||
<product_dir>/</product_dir>
|
||||
<ask_on_error config:type="boolean">false</ask_on_error> <!-- available since openSUSE 11.0 -->
|
||||
<name>SuSE-Linux-SDK</name> <!-- available since openSUSE 11.1/SLES11 (bnc#433981) -->
|
||||
</listentry>
|
||||
</add_on_products>
|
||||
</add-on>
|
||||
<partitioning config:type="list">
|
||||
<drive>
|
||||
<device>/dev/sda</device>
|
||||
|
@ -349,6 +349,12 @@ unless ($onlyinitrd) {
|
||||
system("rm -rf $rootimg_dir/etc/zypp/repos.d/$osver.repo");
|
||||
}
|
||||
system("zypper -R $rootimg_dir ar file:$srcdir $osver");
|
||||
|
||||
if(-e "$rootimg_dir/etc/zypp/repos.d/${osver}sdk.repo") {
|
||||
system("rm -rf $rootimg_dir/etc/zypp/repos.d/${osver}sdk.repo");
|
||||
}
|
||||
my $srcdir_sdk = "$installroot/$osver/$arch/sdk1";
|
||||
system("zypper -R $rootimg_dir ar file:$srcdir_sdk ${osver}sdk");
|
||||
}else {
|
||||
system("zypper -R $rootimg_dir sa file:$srcdir");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user