[OpenIndiana-discuss] Namespace management and symlinks in /usr
Reginald Beardsley
pulaskite at yahoo.com
Wed Oct 17 14:50:54 UTC 2012
In chasing the Firefox/Java issue, I happened to look at the symlinks in /usr. I'm rather disturbed by what I find.
There are 15715 in my installation of oi_151a. I *might* have created a couple, though it's unlikely as I don't generally do that. I usually put such things in ${HOME}/${ARCH}/bin which is at the start of my PATH.
Many of these are legitimate as they alias libraries, but it's still a rather disturbing number.
There are 72 symlinks in /usr/sfw/bin which point to /usr/bin and other places.
While I understand why such things are done, I also know from experience that proliferation of symlinks at this scale is a recipe for disaster. I've had to clean up the mess in large system environments and it's not fun when it breaks.
I'd like to suggest that there be some serious discussion either on or off the list about the issue and how to address it. Aliases to accommodate dynamic linking are fine. Aliases to accommodate badly written scripts are not.
Yes, it is painful to force people to fix their scripts, but in the end, indulging bad behavior just makes the problem worse. Having written scripts that ran cleanly across Ultrix, SunOS, AIX, HPUX, Irix and more I know it's not hard to do things w/o resorting to polluting the system namespace w/ bandaids.
Note, I am not saying symlinks are bad. I have a directory tree in which /app/bin/fubar, is a symlink that points to /app/pkgs/<package>/<version>/bin/fubar. I build a lot of software from source and this is so I can toggle versions in and out of my path w/o stepping on things. So I make very extensive use of symlinks. But I recognize bandaids when I see them.
Reg
More information about the OpenIndiana-discuss
mailing list