Re: Finding newst version in a repository
seth vidal <[email protected]>
| Newsgroups | gmane.linux.rpm.metadata |
|---|---|
| Message-ID | <1164090860.13465.27.camel@cutter> |
On Mon, 2006-11-20 at 18:48 +0100, Per Liden wrote: > 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. this is why rpm has certain rules it works under for establishing newest/oldest. IF the versioning scheme that the program uses doesn't match this then tough luck. > 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. indeed > Any suggestions? I assume yum and other tools has to extract this > information in some way? the yum python modules make figuring out which one is newest pretty simple, actually. What is it you're trying to do? -sv