Jack Howarth wrote: > In order to work around the conflicts over ffi.3, > ffi_call.3 and ffi_prep_cif.3 between the libffi and > gcc45 package, I am looking at adding the calls to > update-alternatives to gcc45. Looking at the openmotif4.info > as an example, I see... > > PostInstScript: << > update-alternatives --install %p/share/man/man3/Object.3 Object.3 > %p/share/man/man3/Object.3.openmotif 65 > << > PreRmScript: << > if [ $1 != "upgrade" ]; then > update-alternatives --remove Object.3 %p/share/man/man3/Object.3.openmotif > fi > << > > However, this doesn't seem to be functional as my installed copy of openmotif4 > has... > > ls -l /sw/share/man/man3/Object.3 > -rw-r--r-- 1 root admin 2452 Sep 12 2009 /sw/share/man/man3/Object.3 > cd /sw/etc/alternatives > ls -l Object.3 > lrwxr-xr-x 1 root admin 33 Jul 24 2009 Object.3 -> > /sw/share/man/man3/Object.3.tcltk > > but... > > ls -l /sw/share/man/man3/Object.3.tcltk > ls: /sw/share/man/man3/Object.3.tcltk: No such file or directory
Although it is a blatant misuse of the update-alternatives system, this example is actually an excellent illustration for the reasons why I hate this system: The system was certainly not meant for avoiding random file name conflicts between arbitrary packages, but for allowing users to choose variants of certain generic utilities. A good example would be /sw/bin/sed, which can point to various different versions of sed. But even in this legitimate case I would dispute its utility, because its effect is that in practice you *lose* control over what you have installed. In your example, update-alternatives was originally used to hide the fact that 2 packages used the same name for two quite different man pages. The update-alternatives command was put into the Fink info files many years ago and then carried on, although it had long since lost its usefulness, because nobody (you included, when you were maintainer of openmotif) understood what it was doing, and therefore nobody dared remove it. > In this case don't we need to explicitly move aside the Object.3 as > Object.3.tcltk in the install directory before creating the deb files? tcltk hasn't had an Object.3 man page for many years, and the package doesn't use update-alternatives --install, only --remove. But you are right, the openmotif package, if it really was serious about using the update-alternatives system, would have had to rename its Object.3 file first, which it appears to have never done. So even when it was introduced into the openmotif info file in 2003 (or earlier; cvs log shows that it was there in April 2003), the update-alternatives command was probably not doing what it was supposed to do. In short: Do not use update-alternatives, unless you absolutely need to and you know what you are doing. -- Martin ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel