Subject: Bug#3226: pkg update-alternatives confusion

From: Bill Mitchell <[email-masked]>
Date: Wed, 5 Jun 1996 11:42:04 -0700 (PDT)

Package: dpkg
Version 1.2.0

A coworker has been installing debian from recently downloaded
files.  He's been using dselect, no direct use of dpkg.  He
had installed nvi, vim, and elvis; and wanted elvis as his
default editor.  He hadn't figured out how to accomplish that
but, in the process of trying, had manually rearranged some
links in /etc/alternatives.

I used dpkg --remove to get rid of nvi, then did the same thing
with vim.  However, we were left with /usr/alternatives/vi pointing
to /usr/bin/vim, which did not exist.

I manually re-pointed it to /usr/bin/elvisnox, and that allowed
him to use vi.  However, subsequent attenpts force the links to
consistency with "dpkg --install elvisx11.deb" produce a message
to the effect that updates to /etc/alternatives/vi are "disabled".

I haven't had time to look at the update-alternatives script
to figure out why it wants to "disable" updates and, not being a
perl programmer, I'm really not anxious to do that anyhow.

Question:  How does my co-worker convince update-alternatives
to update /etc/alternatives/vi when vi packages are changed?

Bug:  I guess that I'm concerned that it was so easy for him to
get into this mess, and that it's not clear how to get out.

---

From: Ian Jackson <[email-masked]>
Date: Thu, 6 Jun 96 02:39 BST

Bill Mitchell writes ("Bug#3226: pkg update-alternatives confusion"):
...
> perl programmer, I'm really not anxious to do that anyhow.

The message printed by update-rc.d says:

 Automatic updates of /etc/alternatives/vi are disabled, leaving it alone.
 To return to automatic updates use `update-alternatives --auto vi'.

I just reproduced your situation on my machine, and
`update-alternatives --auto vi' did indeed return vi to automatic
updates, and update it there and then (to point to nvi in this case).

The automatic updates were disabled because you modified the link in
/etc/alternatives, as you're quite entitled to do, and
update-alternatives noticed this and thought you might like it not to
replace your configuration with its own.

> to update /etc/alternatives/vi when vi packages are changed?

Please ask your co-worker to open their eyes next time.

I'm closing this bug report.

Ian.

---

From: Bill Mitchell <[email-masked]>
Date: Wed, 5 Jun 1996 19:43:43 -0700 (PDT)

On Thu, 6 Jun 1996, Ian Jackson wrote:

>[...]
>[...]

Perhaps I'm missing something, but I don't think that would have
prevented the problem.  He didn't know that update-alternatives
existed -- it's run behind the scenes from the postinst, and the
output, even if it would have been sufficiently informative, scrolled
by during dselect processing.

I do see that "update-alternatives --help", if utterd, produces,
in part:
      update-alternatives --auto <name>
however, it wasn't crystal clear that that was the needed solution.

It's a doc problem, and I understand that you're working on docs.
Presumably, the docs will help when they appear.

In the meantime, please lighten up a bit.  The request was for help,
not for abuse.