alternatives: special-case busybox as alternatives provider
authorYousong Zhou <yszhou4tech@gmail.com>
Wed, 12 Jun 2019 04:19:02 +0000 (04:19 +0000)
committerYousong Zhou <zhouyousong@yunionyun.com>
Fri, 14 Jun 2019 01:08:23 +0000 (01:08 +0000)
commit21b7bd73ae88ba2ce9a5bfeedf67bc204d10fd08
treeff4f1d8a5b4a9c3e710d3c6d3b4e8e1a27ce8329
parentd4ba162bb3f931bd5a019154270a548cf1f0853b
alternatives: special-case busybox as alternatives provider

Almost all busybox applets are alternatives to some other existing
"full" utilities.  To lift the maintenance burden of enumerating CONFIG
symbols, symlink path of each applet, we special case busybox here as a
known alternatives provider.

All file pathes provided by busybox will serve as fallback alternatives
with -inf priority.  Packages intending to switch to using alternatives
mechanism will also not need to depend on the same kind of change be
applied on busybox in base system

v3 <- v2 continue to next when fetching provider pkg failed
v2 <- v1 Move busybox-specific part into data section

Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
libopkg/pkg_alternatives.c