compare installed pkg lists

March 30, 2011

I did this in func-yum before but I  had to do it today with just a pile of files of ‘rpm -qa’ from a set of systems and I put this together for just that purpose.

I realize I could diff the files but then order would matter and for purposes of pkgs on the system, the order doesn’t matter.

http://skvidal.fedorapeople.org/misc/host_pkglist_compare.py

for example:

 


$ python ~skvidal/host_pkglist_compare.py xen05.phx2.fedoraproject.org xen09.phx2.fedoraproject.org
Packages on xen05.phx2.fedoraproject.org not on xen09.phx2.fedoraproject.org

Packages on xen09.phx2.fedoraproject.org not on xen05.phx2.fedoraproject.org
m4-1.4.5-3.el5.1
selinux-policy-devel-2.4.6-300.el5

could make it easier to chase down bogon pkgs installed on your systems.

One Response to “compare installed pkg lists”

  1. atsaloli Says:

    Why not /bin/sort each rpm list before running /bin/diff to compare the two lists? That would handle the line sequence issue and make it easy to see just the items that are present only in one list.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: