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

Bug#267095: 267095: update-alternatives issues



NEEDED DOCUMENTATION CLARIFICATION

The meaning of a number of key terms in the update-alternatives man page
is unclear, at least to me.  I guessed wrong, and got myself in all
kinds of trouble (see above).  That is why I have left this at severity
"normal", though it might be considered "wishlist".

The command summary for --install says
 update-alternatives  [options]  --install  link  name   path   priority
	  [--slave link name path]...
at the top of the page and
  --install gen link alt pri [--slave sgen slink salt] ...
in the detailed discussion.

Aside from the fact that these are inconsistent, and that the arguments
are either not defined or insufficiently defined in the Terminology
section, the key question for all of these, taking editor as an example,
is whether
editor,
/usr/bin/editor, or
/etc/alternatives/editor
is intended for each command line arguemnt.  I couldn't tell.  The
discussion indicates that "gen" is the "generic name", which certainly
suggested to me it should not have a path attached.

*Please clarify the documentation*.

Anyway, I'm pretty sure I guessed wrong, and got my system into a state
where I couldn't install many editor related packages.

In particular, /var/lib/dpkg/alternatives/editor looked like this after
my attempted manipulation (to make /etc/alternative/emacs the default
editor):
auto
editor
editor.1.gz
editor.1.gz

Unfortunately, the exact command I used was not logged well (what I have
was in the original bug report), but that file seems to indicate that I
didn't use paths where I should have.  I edited the preceding file to
auto
/usr/bin/editor
editor.1.gz
/usr/share/man/man1/editor.1.gz

and I think that has fixed the problem.

NAGGING ISSUE
It remains a mystery how /usr/bin/editor was deleted.  I manually
recreated it as a symlink to /etc/alternatives/editor.

If it was deleted because I set /etc/alternatives/emacs (rather than a
specific emacs) as my preferred choice for editor, it would be good to
provide a warning about doing so.

OPTIONAL SUGGESTIONS
It might or might not be desirable to make update-alternatives either
refuse to accept bad (relative path) arguments in some places, or warn
about it, or provide more informative error messages if one gets into
the situation I got into.  (I also found that symlinks for editor and
editor.1.gz were created in my root directory, which I guess is where I
ran the update-alternatives command with the bad arguments).

Given the typical canonical locations of everything, it might be nice to
have commands that worked with fewer arguments (or perhaps made sensible
guesses when presented with incomplete paths--but that's the subject of
the preceding paragraph).

Thanks.


-- 
Ross Boylan                                      wk:  (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4          ross@biostat.ucsf.edu
Dept of Epidemiology and Biostatistics           fax: (415) 476-9856
University of California, San Francisco
San Francisco, CA 94143-0840                     hm:  (415) 550-1062




Reply to: