Sunday, March 20, 2005

RPM Hell

Ok, I am not even sure how it happened, but at some point I enabled a Mandrake Cooker site for urpmi (see the command urmpi.addmedia to add new sites).
well, be VERY careful when you do something like that. Becuase, from now on, many new updates you will install will be from the cooker site .. thus not necessarily the latest tested version but rather a version that is still under dev ...
Somehow I (during installation of some other package) I managed to upgrade my python version from 2.3.4 to 2.4.
The problem is that it broke a bunch of things ... among them bittorrent and rpmdrake.
So .. what do you do .. how do you go back ..

The first challenge was to discover which RPMs did I replace. Thanks to a tip I found on the RedHat site, I discovered the "--last" flag for the RPM command:
rpm -qa --last
will give you the list of RPMs and the day they were installed/updated. Great! Now I knew which ones I broke.
Next, I mounted the Mandrake original CD, pointed to the old Python RPMs and used the --old-package flag to update them.
RPM -Uvh --old-package python-2.3.4-6mdk libpython2.3-2.3.4-6mdk python-base-2.3.4-6mdk
(they are interdependent, so it's better to install them with one RPM command)
That fixed the Python RPMs, and now just running rpmdrake again, and installing updates upgraded them again to the lastest supported version (which is 2.3.4-6.1.10).

That got me out of RPM hell .. for now :)

No comments: