Sunday, January 13, 2008

How to downgrade part of a yum repository

Backstory
(skip down to avoid the rambling...)

I've been running Zimbra 4.0.x/4.5.x on CentOS 4.x for over a year now on a couple different servers without a hiccup, although Zimbra will tell you that CentOS is NOT a supported platform. Of course, RHEL4/5 are officially supported. I dutifully ran each Zimbra upgrade (with full backup prior) and never had a problem, but for Zimbra 5.0, I decided to be cautious. Zimbra 5.0 was released on 12/31/2007 (really trying to be able to say it was released in Q4 '07). Clearly, Zimbra was in a bit of a hurry to get it out the door, and as it was a rather substantial upgrade, I decided to wait until at least 5.0.1.

Sure enough, shortly after the 5.0 release, the Zimbra forums started popping with upgrade problems, which was finally tracked down to a bad interaction with Zimbra and the version of perl (5.8.8) that comes with Red Hat Application Server and CentOS Plus. The stock version of perl is 5.8.5. After checking my Zimbra servers, sure enough, I had the CentOS Plus version of perl installed (not sure why I had done that, but the machines were installed a couple of years ago...)

Several people on the forums were using the following to force install, but that didn't pass the sniff test and would break the first time perl RPM was updated:
$ perl -MCPAN -e shell
force install Scalar::Util


Useful part of story (--nodeps is your friend)

My first pass at this, I thought I'd just remove the perl rpm, fixup the CentOS Plus repository to ignore perl and install the correct version of perl for Zimbra. So, I wanted to see what kind of dependency hell I'd be in if I didn't force anything:
$ perl -v
This is perl, v5.8.8 built for i386-linux-thread-multi
$ sudo yum remove perl
...
Transaction Summary
======================================
Install 0 Package(s)
Update 0 Package(s)
Remove 223 Package(s)
Hmm, plan B? Using 'rpm -e --force' is the quickest way to trash your RPM database, so I wasn't doing that. Fortunately, a more experienced user on the forums suggested just using rpm to uninstall perl with the --nodeps flag.
$ sudo rpm -e --nodeps perl
Nice, that got rid of perl-5.8.8 (also uninstall perl-suid if installed).

Then edit the CentOS Plus repository config to permanently ignore it's version of perl.
$ sudo vi /etc/yum.repos.d/CentOS-Base.repo
(insert 'exclude=perl*' under the [centosplus] section)
Now reinstall perl, and you are good to go.
$ sudo yum install perl
$ perl -v
This is perl, v5.8.5 built for i386-linux-thread-multi

Cleanup


Check for /usr/lib/perl5/5.8.8/ directory. It shouldn't exist, but if it does, you probably installed code from CPAN and need to reinstall the appropriate 5.8.5 code.

4 comments:

Anonymous said...

How to Play Casino: Easy Guide to playing slots on
Casino games are played septcasino.com by 4 players, the average kadangpintar time they take turns is around wooricasinos.info 14:20. The house worrione.com is divided into three distinct categories: the https://tricktactoe.com/ house

Anonymous said...

Casino Bonus Codes - December 2021
No deposit bonus casino promotions. We gri-go.com recommend 2021 https://tricktactoe.com/ casino bonus wooricasinos.info codes and promos for new players. We also list poormansguidetocasinogambling.com new casino bonuses for 출장마사지 December 2021.

caelenoare said...

Play 'em up for free online game! | TopCleo
Play this game for free in the search results page. This 토토사이트 game is for ages 7 to 16 카지노사이트 and can be downloaded to play on your computer systems.

Anonymous said...

You are also free to make use of your loyalty points at Jackpot City’s sister casinos, Spin Palace, Ruby Fortune, and Mother’s Gold Casino. 1xbet Jackpot City has a dedication to customer support which is mirrored of their generous promotions and loyalty scheme, guaranteed to keep new and current players happy. When an internet on line casino in a position to|is ready to} stay afloat in the uneven waters of the gaming trade you can to|you probably can} positive that|ensure that|make certain that} they've consistently shown themselves to be a player-friendly website.