Home > FreeBSD, Is Your Friend > perl-after-upgrade Is Your Friend

perl-after-upgrade Is Your Friend

January 24th, 2009 by Charles Gardner

I just upgraded the main perl port on a FreeBSD box from 5.8.8 to 5.8.9 and a perl based service promptly died, complaining of problems locating dependencies.  D’Oh!!  That’s not good.

After a bit of crunching away I found that each perl module port (each p5-* port) needed a ‘make deinstall && make reinstall’ to align with the new perl version.  The only bugger is that this machine has 54 p5-* ports installed.  Now I’m basically lazy so I wanted a better way than manually reinstalling each port or even writiing a script to handle these specific ports.

Thankfully a little deeper google exercise turned up pearl-after-upgrade.  From the man page:

The standard procedure after a perl port (either lang/perl5 or lang/perl5.8) upgrade is to basically reinstall all other packages that depend on perl. This is always a painful exercise. The perl-after-upgrade utility makes this process mostly unnecessary.

The tool goes through the list of installed packages, looks for those that depend on perl, moves files around, modifies shebang lines in those scripts in which it is necessary to do so, tries its best to adjust dynamically linked binaries that link with libperl.so in the old path, and updates the package database.


Brilliant!! Just what I was looking for.

I ran perl-after-upgrade followed by perl-after-upgrade -f, and it did all the heavy lifting of getting things straight.  Just for good measure I ran a rebuild on mimedefang (portmaster mimedefang), and it was back off to the races for that system.

So I must say….  perl-after-upgrade is your friend!

FreeBSD, Is Your Friend

  1. No comments yet.
  1. No trackbacks yet.