Re: rpm scoring script.
Michael Honeyfield <[email protected]> Mon, 16 Feb 2004 07:36:04 +1300
| Newsgroups | gmane.linux.redhat.rpm.python |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 2004-02-15 at 18:28, seth vidal wrote: > not too hard to do - if you take the code from yum-arch you can do 70% > of this. > > 1. get a list of all the rpms > 2. start going through each one and make a couple of dicts: > (name, arch) : [(e, v, r), (e, v, r)] > (name, arch, e, v, r) : pkg filename > > 3. then go through each (name, arch) in the first dict and if the len of > the list of (e, v, r) is > 1 then compare each (e, v, r) and remove the > one(s) that are older. > > 4. then go through the second dict using the first and copy out the rpms > that are newest. Thanks I will give that a go. Mike