From 89f58e514a61365c429be309e4e44f94741f1ebe Mon Sep 17 00:00:00 2001 From: immarvin Date: Wed, 18 Mar 2015 21:45:28 -0700 Subject: [PATCH] fix defect #4613 [DEV] rhels7.0 provisioning complains !dracut-cmdline[78]: Warning: 'ksdevice=' is deprecated. Using BOOTIF=01-00-21-5e-a6-3d-d7 instead! --- perl-xCAT/xCAT/Utils.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) mode change 100755 => 100644 perl-xCAT/xCAT/Utils.pm diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm old mode 100755 new mode 100644 index b920ef108..bce499e13 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -3596,6 +3596,8 @@ sub version_cmp { $ver_a = shift; } my $ver_b = shift; + $ver_a =~ s/([-.]0+)+$//; + $ver_b =~ s/([-.]0+)+$//; my @array_a = ($ver_a =~ /([-.]|\d+|[^-.\d]+)/g); my @array_b = ($ver_b =~ /([-.]|\d+|[^-.\d]+)/g); @@ -3620,9 +3622,12 @@ sub version_cmp { } elsif ( $b eq '.' ) { return 1; } elsif ($a =~ /^\d+$/ and $b =~ /^\d+$/) { - if ($a =~ /^0/ || $b =~ /^0/) { - return ($a cmp $b); - } else { +# if ($a =~ /^0/ || $b =~ /^0/) { +# return ($a cmp $b); +# } else { +# return ($a <=> $b); +# } + if($a != $b ){ return ($a <=> $b); } } else {