-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Enigmail
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.6 (Darwin)

iD8DBQFBLlUuPMoaMn4kKR4RA176AJ4peREbbO6QwDd74eHcUEasLgMFGACbBbSz
pWBvBJKWyCzeGPOjSDRdPW4=
=BqKp
-----END PGP SIGNATURE-----
--- Begin Message ---
Hi Again (this is LasVegas off irc),

I read up on alternatives, fixed my info file and submitted it to the
tracker. I am still waiting for the fileutils maintainer to update the
fileutils.info to also use alternatives; as of this writing I have not
heard back from them yet.

tylers-file-cmds.info now fully supports alternatives. If you review
the new info file, you will notice that the InstallScript is now

InstallScript: <<
#! /bin/sh -ev
mkdir -p %i/share/man/man1
mkdir -p %i/bin/

cp cp/cp %i/bin/cp.tfc
cp cp/cp.1 %i/share/man/man1/cp.1.tfc
<<

removing the conflict for bin/cp and man/man1/cp.1

A few new sections were added, 

PostInstScript: <<
update-alternatives --install %p/bin/cp cp %p/bin/cp.tfc 60 --slave
%p/share/man/man1/cp.1 cp.1 %p/share/man/man1/cp.1.tfc
<<

PreRmScript: <<
if [ "$1" != "upgrade" ]; then
        update-alternatives --remove cp %p/bin/cp.tfc
fi
<<

Those sections are all that is required to make alternatives work with
my package (a similiar change needs to be made to the fileutils.info
as well). After the binary is installed, update-alternatives will use
a weighting system to pick which package gets to be bin/cp and
bin/man/man1/cp.1 by installing symlinks. Admins can also tell
alternatives to use one package or another manualy. I suggest setting
up my package so it out-weighs fileutils under the assumption that
someone who goes to the trouble to install my package is going to
expect my version of cp to work with out twidling. Note that the only
thing alternatives is in control of is cp and that is the only binary
I install. Alternatives knows how to handle the man page as well in a
master/slave relationship.

I think this fully addresses the concerns you raised on IRC. What do
you think? Also, do you think I should wait for the fileutils
maintainer to fix up fileutils.info to use alternatives, make the
changes and submit a patch, or bring this up on the mail list? It is
such a simple change but changing the behavior of a package someone is
maintaining seems to be like pulling the carpet out from under them.

On another note, I could not find a reference to the Debian
alternatives system in the fink packaging manual. Perhaps it would be
a good idea to add a new section that talks about alternatives, what
it does, how it works and how to setup a package to use it if
neccessary. I would be willing to write this documentation - I'm
always ready to help out a good project =)

Thanks for your time and help!
Tyler

--- End Message ---

Reply via email to