Subject: Bug#3226: pkg update-alternatives confusion

From: Bill Mitchell <[email-masked]>
Date: Thu, 6 Jun 1996 11:17:27 -0700 (PDT)

On Thu, 6 Jun 1996, Ian Jackson wrote:

>[...]
> Automatic updates of /etc/alternatives/vi are disabled, leaving it alone.
> To return to automatic updates use `update-alternatives --auto vi'.
>[...]
>Please ask your co-worker to open their eyes next time.

I've tried this, and I think there's still a problem.
Here's a partial log with embedded comments.

# ls -l /etc/alternatives/vi
lrwxrwxrwx   1 root     root           17 Jun  6 10:44 /etc/alternatives/vi -> /usr/bin/elvisx11
# dpkg --install elvisx11.deb
(Reading database ... 9922 files and directories currently installed.)
Preparing to replace elvisx11 (using elvisx11.deb) ...
Unpacking replacement elvisx11 ...
Setting up elvisx11 ...
/etc/alternatives/vi has been changed (manually or by a script).
Switching to manual updates only.
Checking available versions of vi, updating links in /etc/alternatives ...
(You may modify the symlinks there yourself if desired - see `man ln'.)
Automatic updates of /etc/alternatives/vi are disabled, leaving it alone.
To return to automatic updates use `update-alternatives --auto vi'.
Checking available versions of ex, updating links in /etc/alternatives ...
(You may modify the symlinks there yourself if desired - see `man ln'.)
Leaving ex (/usr/bin/ex) pointing to /usr/bin/elvisx11.
Leaving ex.1 (/usr/man/man1/ex.1) pointing to /usr/man/man1/elvis.1.
Checking available versions of view, updating links in /etc/alternatives ...
(You may modify the symlinks there yourself if desired - see `man ln'.)
Leaving view (/usr/bin/view) pointing to /usr/bin/elvisx11.
Leaving view.1 (/usr/man/man1/view.1) pointing to /usr/man/man1/elvis.1.
Checking available versions of input, updating links in /etc/alternatives ...
(You may modify the symlinks there yourself if desired - see `man ln'.)
Leaving input (/usr/bin/input) pointing to /usr/bin/elvisx11.
Leaving input.1 (/usr/man/man1/input.1) pointing to /usr/man/man1/elvis.1.

*** OK -- I see the "To return to automatic updates ..." message.  It had
*** previusly gotten lost in the forest.

# update-alternatives --auto vi
Setting up automatic selection of vi.
Checking available versions of vi, updating links in /etc/alternatives ...
(You may modify the symlinks there yourself if desired - see `man ln'.)
Updating vi (/usr/bin/vi) to point to /usr/bin/vim.
Leaving vi.1 (/usr/man/man1/vi.1) pointing to /usr/man/man1/vim.1.

*** Hmmmm... I didn't want it set to vim, I just wanted it set back to
*** auto and left pointing wherever it was pointing, so that subsequent
*** installs and removes would update the /etc/alternatives links.

# dpkg --status vim
Package: vim
Status: unknown ok not-installed
Priority: optional
Section: editors

*** vim's not even installed.  I've now broken /usr/bin/vi.

# dpkg --version
Debian Linux `dpkg' package management program version 1.2.0 (i386 elf).
Copyright 1994-1996 Ian Jackson, Bruce Perens.  This is free software;
see the GNU General Public Licence version 2 or later for copying
conditions.  There is NO warranty.  See dpkg --licence for details.
# exit

---

From: Ian Jackson <[email-masked]>
Date: Mon, 10 Jun 96 01:10 BST

(Note changed bugs CC - you'll find that this will work (when I run
the queue), though lists.debian.org is down so you haven't seen the
announcement.)

Bill Mitchell writes ("Re: Bug#3226: pkg update-alternatives confusion"):
...
> *** previusly gotten lost in the forest. 

If you have suggestions about which messages I should remove please go
ahead.

> *** installs and removes would update the /etc/alternatives links.

Could you please do `update-alternatives --display vi' ?

...
> *** vim's not even installed.  I've now broken /usr/bin/vi.

Is there any vi package that set up its vi link as vim ?  Please grep
/var/lib/dpkg/info/* for vim ...

> conditions.  There is NO warranty.  See dpkg --licence for details.

Thanks, that shouldn't make much of a difference.  I'd strongly
recommend moving to 1.2.3 ASAP though - 1.2.0 was rather buggy.

Ian.