On Sat, Jun 4, 2011 at 13:47, Robert G. (Doc) Savage <[email protected]> wrote: > > On Sat, 2011-06-04 at 08:43 -0500, Greg Swift wrote: >> On Sat, Jun 4, 2011 at 08:29, Robert G. (Doc) Savage >> <[email protected]> wrote: >> > I run RHEL5.6 on my central server and Fedora 14/15 on all my desktops >> > and laptops. I'm about to move up to RHEL6.1 on that server. Since we're >> > not supposed to upgrade from one major to another, I'm looking for an >> > effective and efficient way to migrate to RHEL6.1 with the same extras I >> > have with RHEL5.6. >> > >> > With Fedora I can run 'yum list installed' and see which repos >> > everything came from. The same command in RHEL5 simply shows >> > "installed". Repo source info would be helpful on a system with perhaps >> > 10% of its packages from non-RHN repos such as CentOS, EPEL, RPMFusion, >> > ElRepo, Adobe, and others. >> > >> > Is source repo info stored RHEL5 rpm/yum databases the way it is in >> > Fedora? >> >> off the top of my head you can do this: >> >> yum repolist | 'awk '{print $1}' > repolist >> # remove the extraneous lines manually >> >> for repo in `cat repolist` >> do >> yum list installed --disablerepo=* --enablerepo=${repo} > rpms.${repo} >> done > > Greg, > > This has possibilities, but it doesn't quite work. There's an odd number > of single quotes in the awk line that I've worked around to produce this > repolist file: > > adobe-linux-i386 > elrepo > epel > rhel-x86_64-server-5 > rpmfusion-free-updates > rpmfusion-nonfree-updates > > The for loop: > > # for repo in `cat repolist`; do yum list installed > --disablerepo=* --enablerepo=${repo} > rpms.${repo}; done > > produces very similar output files: > > [root@lion] ~ > # dir rpms.* > -rw-r--r-- 1 root root 222993 Jun 4 13:25 rpms.adobe-linux-i386 > -rw-r--r-- 1 root root 223015 Jun 4 13:25 rpms.elrepo > -rw-r--r-- 1 root root 223017 Jun 4 13:25 rpms.epel > -rw-r--r-- 1 root root 222993 Jun 4 13:25 rpms.rhel-x86_64-server-5 > -rw-r--r-- 1 root root 223038 Jun 4 13:26 rpms.rpmfusion-free-updates > -rw-r--r-- 1 root root 223041 Jun 4 13:26 > rpms.rpmfusion-nonfree-updates > > These differ only in their first few lines. For example, rpms.elrepo > starts with: > > Loaded plugins: fastestmirror, keys, kmod, list-data, > priorities, rhnplugin, > : tmprepo > Loading mirror speeds from cached hostfile > * elrepo: elrepo.org > > diff says the rpm list that follows this header is identical in every > other rpms.* file. I think the rpms.adobe-linux-i386 should only contain > three entries: > > adobeair-2.5.1-17730 > adobe-release-i386-1.0-1 > flash-plugin-10.2.152.27-release > > I think I understand what you're trying to do, but I haven't a clue how > to get it to work.
well thats unfortunate. I figured it would work in the inverse of 'extras' which i believe does work in RHEL5. The point of extras is to show what packages were not installed from an enabled repos, and I use it regularly in this fashion. I figured installed might do the inverse. So I guess if you wanted to get more complicated, you could use the output of extras, and do some inversion work... but that migth just be a huge pita. inode0's suggestion about working with the Vendor output is probably easier. _______________________________________________ rhelv5-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/rhelv5-list
