update-alternatives and ispell dictionaries
Dear All,
First of all, let me thank Ian Jackson for including
update-alternatives in the recent dpkg releases; it really makes my
life easier!
I've got the following scenario...
The ispell dictionaries all come as separate packages, and all provide
the virtual package 'ispell-dictionary', which is recommended by
ispell itself. Ispell does not include any dictionary, as it can
quite happily build its own from an list of words the user may have
already.
Anyway, I've just converted the dictionary installation scripts to use
update-alternatives instead of nasty, bug-ridden perl monstrosities.
I'm looking for some advice on how to assign priority numbers to the
different languages, and how the system administrator can pick a
default at install time, or later.
At the moment I have the following priorities assigned...
iamerican 10
ibritish 9
iportuguese 5
Ideally, I'd like the postinst script to prompt...'Would you like
<language> to be the system default?' and have update-alternatives "do
the right thing". I don't see how update-alternatives can be forced
to make the current set of links being installed the default, without
interrogating the /var/lib/dpkg/alternatives/<package> file and
setting the priority higher than any found in there.
Any advice? Or should I just leave the priorities, and issue a
message at install time, informing the system adminitrator that to
make this language the default she should run 'update-alternatives'
manually?
What happens if update-alternatives finds two packages with the
highest priority?
I imagine Ian Jackson is the best qualified person to reply to this
one...
Best wishes at a busy time!
Kenny.
Reply to: