From 3e0d22db7cc1aff4516d417c58cabd1ae6730626 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 10 Sep 2013 14:51:45 +0800 Subject: [PATCH] fixing bug 3764, add osminor version for sles. --- xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm b/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm index 5bd55dd4e..644837924 100644 --- a/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm +++ b/xCAT-buildkit/lib/perl/xCAT/BuildKitUtils.pm @@ -129,8 +129,6 @@ sub get_latest_version } #------------------------------------------------------------------------------ - - =head3 testVersion Compare version1 and version2 according to the operator and @@ -206,7 +204,6 @@ sub testVersion return $bool; } - #------------------------------------------------------------------------------- =head3 isAIX @@ -454,6 +451,12 @@ sub osver $ver = $lines[0]; $ver =~ s/\.//; $ver =~ s/[^0-9]*([0-9]+).*/$1/; + my $minorver; + if (grep /PATCHLEVEL/, $lines[2]) { + $minorver = $lines[2]; + $minorver =~ s/PATCHLEVEL[^0-9]*([0-9]+).*/$1/; + } + $ver = $ver . ".$minorver" if ( $minorver ); } elsif (-f "/etc/UnitedLinux-release") {