luci-app-package-manager: handle versioned provides from apk query
authorMario Andrés Pérez <redacted>
Mon, 27 Apr 2026 19:32:14 +0000 (21:32 +0200)
committerPaul Donald <redacted>
Mon, 25 May 2026 08:48:47 +0000 (11:48 +0300)
commit3a3a3196aa271e233cae5164dd9f8c9d2c8df12f
tree4253df114031173464c99b4bdce9e195e0fea7f4
parent0c98cce386279b4e48bdca7f47603b06b3dc4f38
luci-app-package-manager: handle versioned provides from apk query

'apk query --format json...' outputs the complete provides fields
including the version.
    ...
    "provides": [
      "firewall4-any",
      "uci-firewall=2025.03.17~b6e51575-r2"
    ],
    ...
Versus the previous 'apk info --full'
    ...
    Package: firewall4
    Version: 2025.03.17~b6e51575-r2
    Depends: kmod-nft-core, kmod-nft-fib, kmod-nft-nat, kmod-nft-offload, libc, nftables-json, ucode, ucode-mod-fs, ucode-mod-ubus, ucode-mod-uci
    Provides: firewall4-any, uci-firewall
    ...

Strip the '=<version>' suffix before gathering the providers chain.
This was causing some incorrent dependecy issues (ie. uci-firewall not
detected as satisfied) in the luci package-manager app.

Fixes: https://github.com/openwrt/luci/issues/8563
Fixes: https://github.com/openwrt/luci/issues/8581
Fixes: https://github.com/openwrt/openwrt/issues/23004
Fixes: https://github.com/openwrt/openwrt/issues/23136
Fixes: 1624418f64db1bef1ec8e5fafd42bec63cd0adc0 ("package-manager: migrate to apk-tools JSON API")
Signed-off-by: Mario Andrés Pérez <redacted>
applications/luci-app-package-manager/htdocs/luci-static/resources/view/package-manager.js
git clone https://git.99rst.org/PROJECT