Finding newst version in a repository

Per Liden <[email protected]>
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
Hi,

I'm parsing a primary.xml and want to find out which version of a 
specific RPM is the newest version in the repository. In my case I'm 
parsing primary.xml from fedora 6 updates 
(ftp://sunsite.mff.cuni.cz/pub/fedora/updates/6/i386/repodata) and at 
the moment it has e.g. autofs of version 5.0.1-0.rc2.22 and 
5.0.1-0.rc2.17. What would be the correct way of telling which of these 
is the newest version? Comparing metadata/package/version/@rel seems a 
bit too error prone as version numbering styles can differ. It seems 
that using metadata/package/time/@file or metadata/package/time/@build 
would work but I guess that's sort of a coincidence as a older version 
could in theory be build at a more recent time.

Any suggestions? I assume yum and other tools has to extract this 
information in some way?

kind regards,
/Per
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.