Open Icenowy opened 8 years ago
This is a packaging issue, please move over to aosc-os-abbs
.
not packaging issue. The code dealing with alternatives are in ab3. And it have another aspect: the alternative is unstable after upgrading. I installed elvis and vim. I upgraded, and vi became elvis (used to be vim). 2016年8月2日 21:34于 Mingcong Bai notifications@github.com写道:This is a packaging issue, please move over to aosc-os-abbs.
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.
note: vim-nox
and elvis
have the same prio (50) for /usr/bin/vi
symlink. update-alternatives(8) states that higher prio takes the position if no manual ones are selected, but does not say anything about same-prio cases. ⇐ this refers to an alternative impl
update-alternatives.c:alternative_get_best()
from dpkg (the impl we are using) goes all the way to the end of the linked list (fileset
) in an alternative
structure, and chooses the first (>
) highest-prio match. (Hell yeah, ordered set.)
The fileset is ordered by the following rule:
alternative_load()
→ alternative_parse_fileset()
: database order, add by alternative_add_choice()
alternative_add_choice()
: modify existing, else append. alternative_add_choice()
: manually called for --install
input.... which seems to bias toward an existing one (expected behavior). Weird.
Do we have something like a broken db though?
As when deconfiguring the old version of gawk, the alternative is deleted. So, before the new version is configured, the alternative won't exist.
So some postinsts will fail.