[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: update-alternatives problem



On Tue, 6 Aug 2002 01:27:14 +0100
Carlos Sousa <csousa@tvtel.pt> wrote:

> On Tue, 6 Aug 2002 01:14:32 +0100 Carlos Sousa <csousa@tvtel.pt>
> wrote:
> 
> > I can't think of anything that wouldn't mess up future package
> > upgrades, as you'd have to insert an explicit call to the jemacs
> > link somewhere in the chain. Perhaps the easiest (less troublesome
> > to maintain) way would be to manually change the
> > /etc/alternatives/editor link to point to a scrip where you'd call
> > jemacs:
> > 
> >    editor --(ln)--> script ---> jemacs --(ln)--> joe.
> 
> Sorry, just came to me that you could symlink /usr/bin/jemacs to point
> to your script, and leave the alternatives system intact. Your script
> would then call a symlink called "jemacs" (placed in your ~/, for
> instance), which would point to joe.
> 
>     editor -(ln)-> jemacs -(ln)-> myscript -(call)-> ~/jemacs -(ln)->
>     joe.
> 
> Just re-link /usr/bin/jemacs whenever you upgrade the joe package.

Yes, that was one of the workarounds I thought of. I feel the
alternatives system could use something like that. Instead of relinked
symlinks, a simple script containing something like "exec `which
editor`" would be installed and changed every time the user decides to
change alternatives. A simple call to sed s/oldprog/newprog/ the script
should do the trick.



Reply to: