From dc3230d60d88db38f2ac42a496c8d22fa3b583fe Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 12 May 2009 03:04:05 +0000 Subject: [PATCH] fixed the defect2788630, upgrade nodes with different releases git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3351 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCrflash.pm | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/perl-xCAT/xCAT/PPCrflash.pm b/perl-xCAT/xCAT/PPCrflash.pm index 6721167aa..ac06270af 100644 --- a/perl-xCAT/xCAT/PPCrflash.pm +++ b/perl-xCAT/xCAT/PPCrflash.pm @@ -271,27 +271,29 @@ sub get_lic_filenames { } $filename = File::Spec->catfile( $packages_dir, $dirlist[0] ); - $dirlist[0] =~ /(\w(4)(\d(3))_(\w(3))_(\d(3).rpm$))/; - if(($pns eq $2) && ($4 < $active_level)) { - $msg = $msg. "Upgrade $mtms concurrently!"; - if($activate ne "concurrent") { - $msg = "Option --actviate's value should be disruptive"; - return ("", "","", $msg, -1); - } - } else { - $msg = $msg . "Upgrade $mtms disruptively!"; - if($activate ne "disruptive") { - $msg = "Option --actviate's value should be concurrent "; - return ("", "","", $msg, -1); - } - } - #print "filename is $filename\n"; + $dirlist[0] =~ /(\w{4}(\d{3})_(\w{3})_(\d{3}.rpm$))/; ############## #If the release levels are different, it will be upgrade_required. - ############# + ############# if($fff ne $2) { $upgrade_required = 1; + } else { + + if(($pns eq $1) && ($4 < $active_level)) { + $msg = $msg. "Upgrade $mtms $activate!"; + # if($activate ne "concurrent") { + # $msg = "Option --actviate's value should be disruptive"; + # return ("", "","", $msg, -1); + # } + } else { + $msg = $msg . "Upgrade $mtms disruptively!"; + if($activate ne "disruptive") { + $msg = "Option --actviate's value shouldn't be concurrent, and it must be disruptive"; + return ("", "","", $msg, -1); + } + } } + #print "filename is $filename\n"; my $xml_file_name = $filename; $xml_file_name =~ s/(.+\.)rpm/\1xml/; #print "check_licdd_update: source xml file is $xml_file_name\n";