Recently, one of the co-located webservers that I help administer developed some fairly typical colo server problems, and it was agreed that the time had come to upgrade from Fedora Core 2 to Fedora Core 3. I volunteered to perform the upgrade remotely - the server is in California and I am in England - using Yum, the package manager that ships with Fedora Core.

I spent some time screwing around trying to find a decent yum.conf for Fedora Core 3 on the Internet, and finally found the Fedora.us wiki’s FedoraSources page. I installed it in /etc, made sure that it pointed to the FC3 repositories, and ran yum upgrade. So far, so good.

Hours later, Yum had downloaded all the packages it thought it needed, and got about a third of the way through installing them, when it hung, with the Python process taking up over 200 megs of RAM, doing absolutely nothing. Control-C didn’t work, and neither did a simple kill - I had to kill -9 the process ID. Then I ran yum upgrade again, hoping it would pick up where it left off.

No such luck. Yum instead started complaining of broken dependencies, and refused to install anything. Well, of course its dependencies were broken - the system was a third of the way between Fedora Core 2 and 3! Not only that, but there were apparently duplicate packages of various important things like glibc installed, each with different version numbers. I was 6,000 miles from a webserver with a now-broken packaging system. I started to sweat a little.

In desperation, I turned to APT to clean up Yum’s mess. Thankfully yum install apt still worked - I think I had to make sure that Fedora Extras were enabled in the yum.conf - and, although the FedoraSources page claims that there are no APT sources for Fedora Core 3, in reality, you can change the revision number in the FC2 sources.list from 2 to 3, and it apparently does find sources for Fedora Core 3 on apt-get update.

APT whined about the tons of duplicate packages, but did clean up the mess when I ran apt-get -f install. What’s more, a subsequent apt-get dist-upgrade actually did finish the upgrade to Fedora Core 3. To be fair, APT didn’t know what to do about the duplicate packages and I had to remove them with this hack:

rpm -qa --qf "%{NAME}t%{NAME}-%{VERSION}-%{RELEASE}n" 
    | sort -r 
    | perl -lne '($pkg, $ver) = split; print $ver if $pkg eq $oldpkg; $oldpkg = $pkg' 
    | sudo xargs -n1 rpm -e

That left a few duplicate devel packages the first time, so I ran it again. The upshot is that the machine rebooted with a shiny new Fedora Core 3 install! (Subsequent note: Okay, I did also have to move /etc/postfix/aliases.rpmsave back to /etc/posfix/aliases to get the MTA working again… But that’s not the packaging system’s fault, per se!)

Last week, I was upbraided by a Fedora developer for running an APT archive of GIS RPMs for Fedora Core. Given that Yum is the packaging system shipped with Fedora Core, he maintained, I should start using it and expect APT to fall by the wayside. He pointed to the halting official support for Fedora Core 3 and the lack of Fedora Extras for FC3 available from APT (which I believe is not actually so). Given my own experience - and we’ll leave aside the ways in which APT provides a superior user interface (e.g. countdown timers for downloads) - I think my next move will be to apt-get remove yum from that webserver.

Was I a fool? Was I right? Did I misuse Yum somehow? Have you had similar problems or no problems at all using either Yum or Apt on Fedora Core?