port/implement an update-alternatives feature in postmarketOS/Alpine
(Suggested by @MartijnBraam)
The update-alternatives
tool in Debian enables optional opinionates software features that are enabled by default but can be opted out of.
For example, installing neovim
would install some alternatives-metadata
and trigger the update-alternatives
script which could then check if you have vim installed, and if not then create a symlink for it from neovim.
This would also be useful for iwd/wpa_supplicant, the distinction is that instead of messing with services via .post-install
hooks, there is some common way for packages to suggest that they provide alternative (and softly mutually exclusive) implementations. update-alternatives
would ensure that SOME wifi daemon is enabled, and figure this all out after apk
runs.
With the syslogd/logbookd transition, this would also allow for us to properly handle things without the janky version checks and enabling services in the post-install.
https://man7.org/linux/man-pages/man1/update-alternatives.1.html
Just had this idea and wanted to write it all down before I forgot.