Re: Bug#2378: Gawk postinst script does not work correctly
'Ian Jackson wrote:'
>Chris Fearnley writes ("Bug#2378: Gawk postinst script does not work correctly"):
>> If you want to make gawk the default awk, edit
>> /var/lib/dpkg/alternatives/awk (I think that's the path - not at a
>> Debian system right now) and then run update-alternatives by hand (-h
>> to get help).
>Huh ? No, don't do this. Type:
> # cd /etc/alternatives
> # ln -sf /usr/bin/gawk awk
>Simple enough ? 
Yes, but poorly documented. Actually, it is documented (and probably
documented well enough):
()/space/debian/binary/base# update-alternatives --auto awk
Setting up automatic selection of awk.
Checking available versions of awk, updating links in /etc/alternatives ...
(You may modify the symlinks there yourself if desired - see `man ln'.)
Updating awk (/usr/bin/awk) to point to /usr/bin/mawk.
>> I've submitted a bug report (#1921) and patch to
>> update-alternatives in an attempt to make it easier to perform this
>> operation. I believe that bug is still outstanding.
>I think you must have been confused, or at least the reason I left
>that bug outstanding was because there are some packages where the
>sysadmin really has to choose which is the default (spelling
>dictionaries, for example), and update-alternatives doesn't allow
>that since it always operates without prompting.
Not confused, ignorant :) I think I was in 'solve it by scripts' mode
(unfortunately, an all too common plight for Debian developers!). I
hadn't anticipated that the design was robust enough to allow (in
fact, encourage) manual link manipulation. Anyway, ignore my "patch"
to update-alternatives, you've taught me to prefer the current behavior.
> Yes, this _will_ be preserved across upgrades and de- and
>re-installations of mawk. I don't remember whether it will survive
>deinstalling gawk ...
And it seems to give good messages across upgrades and de- and
re-installations. It survives deinstalling gawk and gives many
clues to the admin to puzzle out how to adjust things to taste. But
it doesn't DO IT for the admin. Alas, understanding and
system administration skills are still required :(
Christopher J. Fearnley | UNIX SIG Leader at PACS
email@example.com | (Philadelphia Area Computer Society)
http://www.netaxs.com/~cjf | Design Science Revolutionary
ftp://ftp.netaxs.com/people/cjf | Explorer in Universe
"Dare to be Naive" -- Bucky Fuller | Linux Advocate