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:
angli-xcat 2011-07-01 11:27:04 +00:00
parent ba1d9fd685
commit a895543523
2 changed files with 16 additions and 11 deletions

View File

@ -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 )

View File

@ -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"});
}