Ports are the greatest thing in package management (yes, I realize it's more a source management tree - but bare with me here). And, BSD admins sleep much better than Linux admins (well, those that have to do upgrades and those that care). It's just easier to upgrade a BSD box reliably. Debian touches on the package management garment, but apt-get has its limitations. Once I found portupgrade, I've never looked back. I can't imagine managing a Unix/Post server without it.
When you find yourself in a tight spot over upgrading something that has a ton of dependencies, just glob the upgrade.
portupgrade -r upgrades all the packages that depend on that program.
portupgrade -R upgrades all the dependencies.
So, portupgrade -rR upgrades that package and the packages that rely on it. Specifically, I needed to upgrade PHP to the latest version, along with all the extensions. So, I just typed in:
portupgrade -rR php5 and away it went, upgrading every single package to the latest version for that instance of PHP5. Beautilful! Now, that's not a silver bullet. Not all ports are kepted perfectly. And, you also need to make absolutely sure all your ports' tree is up to date. That's where portsnap comes into play.
Right before I upgrade something, I do a portsnap update:
portsnap fetch
portsanp extract (first time use only)
portsnap update (each time after, which requires a fetch first)
Posted in tech jasonn's blog
Submitted by jasonn on November 16, 2006 - 10:32am.