revdep-rebuild pre7 re-write failed to work on FreeBSD for finding bins built with a specific library. I needed this to work as I’m rebuilding against libthr instead of libpthread and as the two libraries are mixed without a libmap.conf it’s segfault city- heh.
As FuzzyRay wasn’t around to aide in debugging at the time I plunged into it’s source yesterday. My eyes bled from spending time looking through it for the bug :(
Basically revdep-rebuild, like many other Gentoo utilities, uses bash. Well, it uses bash constructs but nothing bash specific that cannot be done trivially in pure sh. It also abuses find, grep, awk and sed. Me being the awkward sort, I took offence to this and did a ground up re-write in pure sh. You can find it here. The crew in #portage are looking over it and it may or may not be used. But they all think it’s cleaner, so I’d say the chances are good.
But how is this about vendor lock-in? Simple really. It’s another demonstration that most of the time you don’t need to force bash. Why should every script on my system force bash? Gentoo is about choice, and I choose not to have bash when possible :) As a login shell it’s the best, but as a scripting shell it’s too big and bloaty. Basically I’m going to make it a little goal - when I find a bash script I’ll de-bashify it and pester upstream to accept it. This makes the script run on more platforms, so unless you’re in bed with the bash maintainer there’s no driving reason not to.