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

Alternative program versions (eg vi)

In the next version of dpkg, which should with a bit of luck be
available this weekend, will contain a program for managing files like
/usr/bin/vi which are symlinks each to one of a number of alternative

The script will be called update-alternatives.  When called from the
pre/post-inst/rm scripts it will arrange for /usr/bin/vi (say) to
point to /etc/alternatives/vi, and it will update /etc/alternatives/vi
if appropriate.

The sysadmin will be able to modify the links in /etc/alternatives and
have these modifications respected.

The script will be able to modify (continuing the example)
/etc/alternatives/vi.1 to point to the correct manpage.

Each possible version needs a priority number, which will be passed as
an argument to update-alternatives.  The version with the highest
priority will be used in preference, unless the sysadmin modifies the
link manually.

I haven't quite finalised the arguments and algorithm for the
update-alternatives script, but we do need to decide on the numbers
for the various versions of programs.

What priority order should relate the three versions of `vi' ?

Use of update-alternatives will be mandatory, and should replace any
special-case code in the maintainer scripts of affected packages.

Note that this script will *not* solve problems like mt-st vs
cpio-st.  It is not intended to.  I plan to introduce a different
mechanism to solve this kind of problem.


Reply to: