Bug fix ID 3348945
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9995 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
ba1d9fd685
commit
a895543523
@ -23,14 +23,15 @@ sub localize_yumrepo {
|
||||
}
|
||||
sub check_tofix {
|
||||
if (-d $File::Find::name and $File::Find::name =~ /\/repodata$/) {
|
||||
fix_directory($File::Find::name);
|
||||
if($distname =~ /rhels5/)
|
||||
{
|
||||
fix_directory($File::Find::name);
|
||||
}
|
||||
generate_repo($File::Find::name);
|
||||
}
|
||||
}
|
||||
sub fix_directory {
|
||||
|
||||
my @xmlines=();
|
||||
my $primaryxml;
|
||||
|
||||
sub generate_repo
|
||||
{
|
||||
#write local-repository.tmpl
|
||||
my $dirlocation = shift;
|
||||
my @dircomps = File::Spec->splitdir($dirlocation);
|
||||
@ -43,6 +44,11 @@ sub fix_directory {
|
||||
print $yumrepofile "baseurl=$yumurl\n";
|
||||
print $yumrepofile "enabled=1\n";
|
||||
print $yumrepofile "gpgcheck=0\n\n";
|
||||
}
|
||||
sub fix_directory {
|
||||
|
||||
my @xmlines=();
|
||||
my $primaryxml;
|
||||
|
||||
$grep_result = system("grep sha256 $dirlocation/repomd.xml|grep \\<checksum");
|
||||
if( $grep_result == 0 )
|
||||
|
@ -1410,11 +1410,10 @@ sub copycd
|
||||
#my $rc = system("cd $path;rsync -a . $installroot/$distname/$arch/");
|
||||
chmod 0755, "$installroot/$distname/$arch";
|
||||
require xCAT::Yum;
|
||||
if($distname =~ /rhels5/)
|
||||
{
|
||||
xCAT::Yum->localize_yumrepo($installroot, $distname, $arch);
|
||||
}
|
||||
if ($rc != 0)
|
||||
|
||||
xCAT::Yum->localize_yumrepo($installroot, $distname, $arch);
|
||||
|
||||
if ($rc != 0)
|
||||
{
|
||||
$callback->({error => "Media copy operation failed, status $rc"});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user