Re: [Yum-devel] repoquery question [answered: Pay it forward]

2012-01-12 Thread Dan White
The following extract from "find-repos-of-installed" gives me what I need. I can grep from there. #!/usr/bin/python -tt import yum my = yum.YumBase() pkgs = my.rpmdb i=0 for ipkg in sorted(pkgs): apkgs = my.pkgSack.searchPkgTuple(ipkg.pkgtup) if len(apkgs) >= 1: apkg = apkgs[0]

Re: [Yum-devel] repoquery question

2012-01-12 Thread James Antill
On Thu, 2012-01-12 at 16:31 +, Dan White wrote: > Tried it. > Does not work. > > RHEL5 system > > % yum list yum > yum.noarch 3.2.22-37.el5 installed As Seth said, this only works on RHEL-6. > # ./find-repos-of-install.py > Loaded plugins: product-id, rhnplugin, versionlock > Traceback

Re: [Yum-devel] repoquery question

2012-01-12 Thread Dan White
Tried it. Does not work. RHEL5 system % yum list yum yum.noarch 3.2.22-37.el5 installed # ./find-repos-of-install.py Loaded plugins: product-id, rhnplugin, versionlock Traceback (most recent call last): File "./find-repos-of-install.py", line 51, in ? if not my.setCacheDir(opts.tempcach

Re: [Yum-devel] repoquery question

2012-01-12 Thread seth vidal
On Thu, 12 Jan 2012 15:29:54 + (UTC) Dan White wrote: > Is there a way to list installed RPM's and also indicate the repo > they came from ? > > I am admining some Red Hat boxes and had some doomsayers start > grouching about adding some EPEL packages to the mix, so I have to > identify what

[Yum-devel] repoquery question

2012-01-12 Thread Dan White
Is there a way to list installed RPM's and also indicate the repo they came from ? I am admining some Red Hat boxes and had some doomsayers start grouching about adding some EPEL packages to the mix, so I have to identify what came from where. “Sometimes I think the surest sign that intelligen