Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 02-26-2007, 10:44 AM   #1
LQ Newbie
Registered: Jun 2004
Distribution: RHEL
Posts: 11

Rep: Reputation: 0
Compare kernel version with rvc failed for kernel 2.6.9-42.0.8.EL

Hi, i'm using the rvc (RPM Version Compare) tool from here.

I use this with my scripts to compare versions of installed rpms and it works great if the version numbers
are of the same type.

If i compare kernel version A=2.6.9-42.0.8.EL with B=2.6.9-40.0.8.EL the program returns
that A is newer than B which is correct.

But when i compare kernel version A=2.6.9-42.0.8.EL with B=2.6.9-42.EL the program returns
that B is newer than A which is incorrect.

Does anyone have tips or solution how to handle this.
Is there another tool to use when comparing version numbers?

Old 02-27-2007, 11:58 PM   #2
Registered: Aug 2006
Location: Shen Zhen
Distribution: Ubuntu 10.04
Posts: 198

Rep: Reputation: 33
>>But when i compare kernel version A=2.6.9-42.0.8.EL with B=2.6.9-42.EL the program returns that B is newer than A which is incorrect.

The program compares the characters in order to judge which one is newer. In your case, compare the first different character "0" in A=2.6.9-42.0.8.EL and "E" in B=2.6.9-42.EL. While character "0"(48) in ASCII table is higher than "E"(69), you get the above result that B is newer than A. I think you would modify your code to void it.

Good luck.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Panic after HTB init, kernel part version 3.17 conjoinix Linux - Kernel 0 02-06-2007 12:53 AM
how to load kernel module based on kernel version? linetnew Linux - Newbie 3 05-10-2005 11:45 AM
rpm -qa | grep kernel gives wrong kernel version markelo Red Hat 3 07-18-2004 09:35 AM
Unable to build NVIDIA kernel module / determin kernel version Night Ink Fedora 2 05-31-2004 04:54 PM

All times are GMT -5. The time now is 04:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration