From 2e74d3b4d6c4467f638fd6df8beef984ef02f4ad Mon Sep 17 00:00:00 2001 From: immarvin Date: Tue, 27 Nov 2012 12:32:32 +0000 Subject: [PATCH] 1.import PGP-KEY after copycds;2.add support to remove local repo template git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14437 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Yum.pm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/Yum.pm b/perl-xCAT/xCAT/Yum.pm index 04a992489..1dc9aa2d5 100644 --- a/perl-xCAT/xCAT/Yum.pm +++ b/perl-xCAT/xCAT/Yum.pm @@ -26,6 +26,16 @@ sub localize_yumrepo { close($yumrepofile); } + +sub remove_yumrepo { + my $self = shift; + my $installroot = shift; + $distname = shift; + $arch = shift; + + rmtree("$installroot/postscripts/repos/$distname/$arch/"); +} + sub check_tofix { if (-d $File::Find::name and $File::Find::name =~ /\/repodata$/) { if($distname =~ /rhels5/) @@ -33,11 +43,13 @@ sub check_tofix { fix_directory($File::Find::name); } generate_repo($File::Find::name); - } + } elsif($File::Find::name =~ /\/RPM-GPG-KEY/){ - qx(rpm --import $File::Find::name); + qx(rpm --import $File::Find::name); } } + + sub generate_repo { #write local-repository.tmpl