Added {profile}.repolist functionality.
{profile}.repolist contains list of custom repositories (directory with rpms). Repositories will be added to the image before package installation. This makes possible to automatically install (by defining in {profile}.pkglist) packages that are not contained in standard distribution repository. Example sles/compute.repolist provided. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2120 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
0d56a54ddf
commit
d138e18555
10
xCAT-server/share/xcat/netboot/sles/compute.repolist
Normal file
10
xCAT-server/share/xcat/netboot/sles/compute.repolist
Normal file
@ -0,0 +1,10 @@
|
||||
#--
|
||||
#-- This file contains list of custom repositories (directory with rpms).
|
||||
#-- Repositories will be added to the image before package installation.
|
||||
#-- This makes possible to automatically install (by defining in {profile}.pkglist)
|
||||
#-- packages that are not contained in standard distribution repository
|
||||
#--
|
||||
#-- File format:
|
||||
#Type|URL|name
|
||||
#-- example:
|
||||
#Plaindir|file:/install/sles10sp2/x86_64/custom|custom
|
@ -110,6 +110,19 @@ unless ($onlyinitrd) {
|
||||
system("zypper -R $installroot/netboot/$osver/$arch/$profile/rootimg/ sa file:$srcdir_otherpkgs");
|
||||
}
|
||||
|
||||
#-- add custom repositories to the image
|
||||
if (-r "$pathtofiles/$profile.repolist") {
|
||||
$repolist = "$pathtofiles/$profile.repolist";
|
||||
print "Reading custom repositories\n";
|
||||
open($repoconfig,"<","$repolist");
|
||||
while (<$repoconfig>) {
|
||||
chomp;
|
||||
next if /^\s*#/;
|
||||
($repotype,$repourl,$repoalias) = split m/\|/;
|
||||
system("zypper -R $installroot/netboot/$osver/$arch/$profile/rootimg/ sa -t $repotype $repourl $repoalias");
|
||||
}
|
||||
}
|
||||
|
||||
#my $yumcmd = "yum -y -c /tmp/genimage.$$.yum.conf --installroot=$installroot/netboot/$osver/$arch/$profile/rootimg/ --disablerepo=* ";
|
||||
#$yumcmd .= "install ";
|
||||
#mkpath("$installroot/netboot/$osver/$arch/$profile/rootimg/var/lib/yum");
|
||||
|
Loading…
Reference in New Issue
Block a user