From fb7a95371997d6d4e1990ed71e5aeb938c2b717e Mon Sep 17 00:00:00 2001 From: angli-xcat Date: Fri, 3 Jun 2011 07:36:02 +0000 Subject: [PATCH] To solve a bug, the primary.xml should be unlinked before we depress primary.xml.gz git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9735 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Yum.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/Yum.pm b/perl-xCAT/xCAT/Yum.pm index 7ad5dcbd6..6ff90907b 100644 --- a/perl-xCAT/xCAT/Yum.pm +++ b/perl-xCAT/xCAT/Yum.pm @@ -57,16 +57,16 @@ sub fix_directory { chomp($oldsha); #update primary.xml.gz & primary.xml + if( -r "$dirlocation/primary.xml") + { + unlink("$dirlocation/primary.xml"); + } system("/bin/gunzip $dirlocation/primary.xml.gz"); $oldopensha=`/usr/bin/sha1sum $dirlocation/primary.xml`; $oldopensha =~ s/\s+.*//; chomp($oldopensha); - if( -r "$dirlocation/primary.xml") - { - unlink("$dirlocation/primary.xml"); - } open($primaryxml,"+<$dirlocation/primary.xml"); while (<$primaryxml>) { s!xml:base="media://[^"]*"!!g;