On Sun, 06 Aug 2000, Thomas Schoepf wrote:
This message is CC'ed to debian-devel, because I think the same problem
(removing manually sets alternatives on upgrade) is in other packages.
> On Sun, Aug 06, 2000 at 09:32:34PM +0200, Robert Luberda wrote:
> > But everytime I upgrade less this link automatically changes to
> > /usr/bin/lv and I must manually set it to less. This is very
> > annoying!
>
> Do you think it's a bug that lv has a higher priority than less?
No. It's no matter less have higher priority than lv or not.
> Or do you think that update-alternatives should not overwrite your manual
> changes?
Yes. And you should not remove alternative in less's prerm script to
give update-alternatives a chance to save my settings.
I've done some tests: I have reinstalled (apt-get install --reinstall) all
packages which provides pager - less, w3m, lv, util-linux (/bin/more).
Reinstallation of less, w3m and lv resets pager alternative, but
reinstallation of util-linux - not. Why? Because util-linux prerm script
calls `update-alternatives --remove pager' only when package is going to be
removed, not when is going to be upgraded. Other packages removes it even if
package is upgraded.
But there is another problem: update-alternatives resets link for
pager to the best alternative even when w3m is upgraded and alternative
`pager -> w3m' is removed. I think this is a bug in update-alternatives,
which should resets link to default only if alternative for program
which I set as my pager, is removed. (If my alternative for pager is
less, update-alternative should reset link to the best alternative
_only_ when less is removed. In other words: if w3m (more, lv,...)
is not my pager, why removing w3m (more, lv...) resets link to the best
pager's alternative???)
To conclude:
1) Packages should not to remove alternative when upgrading - and this
is bug in less, w3m, lv and probably other packages.
2) Update-alternatives should not remove manually set link when not
removing alternative for package which provides this link - and it's
a bug in update-alternatives (so please reassign this bug to less and dpkg,
if you can).
Regards,
Robert
--
Robert Luberda
robert@pingu.ii.uj.edu.pl