AOSC-Archive / autobuild3

AOSC OS package maintenance toolkit (version 3)
https://aosc.io
GNU General Public License v2.0
24 stars 17 forks source link

alternatives: will fail when the package is not still configured #95

Open Icenowy opened 8 years ago

Icenowy commented 8 years ago
**  Generating initrd (Initialization RAM Disk) for kernel version 4.1.5-aosc-main ...
/usr/bin/plymouth-set-default-theme: line 65: awk: command not found
/usr/bin/plymouth-set-default-theme: line 65: awk: command not found

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.

MingcongBai commented 8 years ago

This is a packaging issue, please move over to aosc-os-abbs.

Icenowy commented 8 years ago

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.

Artoria2e5 commented 7 years ago

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:

... which seems to bias toward an existing one (expected behavior). Weird.

Do we have something like a broken db though?