FreeBSD Ports Upgrade Nightmare

I have a FreeBSD 6.2 box at home mainly for developing some UNIX/Linux based applications. Typically, when I upgrade FreeBSD or Linux systems, I have always chosen to backup the important stuff and do a clean installation. It makes sense since clean installation typically guarantees that everything gets updated correctly. As an added benefit, a clean installation also clears the clog collected over the time and makes the system run faster. Anyway, since I haven’t upgraded anything after I installed FreeBSD 6.2 late last year many ports have gone out of date. Instead of waiting for the next release of FreeBSD to come, I thought that I would just do a port upgrade to the whole system so that all the ports would be brought to the most up-to-date state. And from many sources, it was even suggested that I should do a port upgrade once a while to keep my installation fresh. So, following the advice I gathered from various sources, I decided to give portsmanager a try: I firsted installed the portsmanager, pkg_add –r portsmanager And then did an update on all the installed ports. portmanager –u This turned out to be a big mistake. While in theory, everything should work, in reality it rarely works that way. Since I had quite a few ports installed (for experimenting purpose, etc.), the update process took a really long time. I didn’t keep track of how much time it took to upgrade all the ports. Since some ports would popup a confirmation or option screens (should have added the –y switch), I had to manually intervene quite a bit. As a crude estimate though, it took well over five hours! When everything was done, I went to check a couple of programs that I knew was updated (e.g. wordpress, apache server, etc.), and they all seemed to work fine… till I tried to bring my KDE desktop back. My X-Windows refused to start and was complaining about some configuration errors. As it turned out, for whatever reason, the ports upgrade changed the default X-Windows manager from Xorg to XFree86 and the configuration file was messed up as well…  Luckily enough, I backed up all my configuration files and after hours of comparison, I finally fixed the problem. Final Thoughts While the idea of building everything from scratch is in theory a good thing, in practice, it takes too much time and a simple upgrade can turn a healthy system into something useless and fixing it would easily be a multi-day activity. This is certainly not what average users would want to do. And clearly, the ports building process is not bulletproof either, which makes the extra time invested in building everything from scratch hardly justified.

Be Sociable, Share!

One Comment

  1. Julian Noble says:

    I have to agree that in practice the FreeBSD ports system is a bit of a lottery.
    I’ve been using it for a few years – and by and large a portupgrade will go smoothly, but when it does go wrong it can indeed be a huge timewaster. In fairness, it’s a difficult problem the ports system is trying to solve – no wonder it’s a little fragile.

Leave a Reply