yum upgrades tip

When upgrading with yum I have started taking an rpm inventory before and after the upgrade.
Before Upgrade:

rpm -qa > BeforeUpgrade.txt

After Upgrade:

rpm -qa > AfterUpgrade.txt

Then I can compare them so that I know which packages were not upgraded and I can figure out why the did not upgrade.

cat BeforeUpgrade.txt AfterUpgrade.txt | sort | uniq -c | sort -n | grep "^\ *2"

yum Could not find any working storages

I upgraded a server from CentOS 4 to CentOS 5 via yum and kept getting “Could not find any working storages.” I searched the web and found some other people having the same problem, but I didn’t see any solutions. After some fun with strace, I found that it was looking for /usr/lib/python2.4/site-packages/sqlite which wasn’t there. It turns out that the package name for python-sqlite did not change between CentOS4 and CentOS5 so the package was not upgraded. I suggest that if you have this problem you look at all the files in /usr/lib/python2.3/ and find out what packages they belong to with “rpm -qf” and upgrade them manually. You can upgrade python-sqlite with the following command (The version number may change).

rpm -Uvh --force http://mirror.centos.org/centos/5.1/os/i386/CentOS/python-sqlite-1.1.7-1.2.1.i386.rpm