FreeBSD ports fix

If you ever find yourself in my situation, where installing some updated port from a relatively freshly done cvsup ends up breaking a couple dozen other programs because it decided to upgrade several libraries, you might find the following for loop useful:

cd /usr/X11R6/bin && for m in $(for l in $(for j in $(for i in *; do
ldd $i 2>/dev/null | grep -q "not found" && echo $i; done);do
egrep "bin/$j" /var/db/pkg/*/+CONTENTS;done | sort -u | cut -f1 -d:);do
grep " ORIGIN" $l;done | cut -f2 -d: | sort -u);do
cd /usr/ports/$m && make && make deinstall && make reinstall;done

Obviously, the above is evil in itself, so it should be considered a “quick fix” and nothing more. Enjoy!

2 Comments

  1. Yes, it is sad but true – stability and fixes and been thrown out the door at FreeBSD as best I can tell. There are all these ‘rush’ deadlines for new releases while the existing ‘RELEASE’ stuff doesn’t work. My expectation is that the 5.X tree is basically something we should all forget about and hope that the 6.X release set is stable. Its been bad for a couple of years now and very discouraging.

Leave a Reply