]> git.ipfire.org Git - thirdparty/openwrt.git/commit
base-files: handle packages alternatives when apk removes packages 19093/head
authorMario Andrés Pérez <mapb_@outlook.com>
Thu, 12 Jun 2025 13:49:59 +0000 (15:49 +0200)
committerRobert Marko <robimarko@gmail.com>
Mon, 23 Jun 2025 07:39:12 +0000 (09:39 +0200)
commit47b6b9de1a6c37b877be250fdd759a64337c9ecc
tree6f243664fc4dc2fd8e102c0319a962592cca9575
parentfccd1dd0aec027dc31cef0233225ea56a507fb64
base-files: handle packages alternatives when apk removes packages

On commit 3010ab8 ("base-files: add update_alternatives function") was
implemented the function to handle ALTERNATIVES when using APK (OPKG
handle it internally) but in commit bcc6415 ("base-files: add
compatibility for APK and OPKG") was only called when adding a package,
so call it also when removing packages.

While we are here, check for a more specific *.alternatives files instead
of *.list, and remove redundant "filelist" variable definition.

Fixes: bcc6415 ("base-files: add compatibility for APK and OPKG")
Fixes: https://github.com/openwrt/openwrt/issues/19090
Fixes: https://github.com/openwrt/openwrt/issues/16991
Reported-and-tested-by: Eric Fahlgren <ericfahlgren@gmail.com>
Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19093
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/base-files/files/lib/functions.sh