Re: repoquery/yum latest_and_not_obsoleted?
seth vidal <[email protected]>
| Newsgroups | gmane.linux.rpm.yum |
|---|---|
| Message-ID | <1216052528.22834.14.camel@rosebud> |
On Sun, 2008-07-13 at 09:51 +0300, Axel Thimm wrote: > Hi, > > for running bcfg2 or also maybe other configuration engines checking > the package install status one needs a list of valid packages for that > repo. Ideally there would be a command to query all packages in the > repos like yum does, but only show the latest and the ones not > obsoleted by other packages, e.g. what yum uses in its final rounds. > yum list available pkgname-ver-rel.arch should do that - but if you want to make it more precise a very short python script should do it. import yum my = yum.YumBase() my.conf.cache=1 # to avoid updating the metadata newestpkgs = my.pkgSack.returnNewestByNameArch() then you can iterate that list if you so choose. Tell me a bit more about what you need to query on and I think we can hack something up that's simple. -sv