rpc-sys: rework packagelist call for apk master
authorEric Fahlgren <ericfahlgren@gmail.com>
Mon, 25 Nov 2024 17:48:52 +0000 (09:48 -0800)
committerRobert Marko <robimarko@gmail.com>
Mon, 2 Dec 2024 10:25:24 +0000 (11:25 +0100)
commitcc9a471c32e106fa9ee045540613fefdc31c5cd2
tree0a73940fb3034ac8c4210f5c340a726b024a2b40
parent9f4b86e70352ab9ca6aa272d096419acc53e2390
rpc-sys: rework packagelist call for apk

Parse the apk files to produce the packagelist.

Reads both the 'installed' file to collect all package names and
versions.  If the 'all' parameter is false, then only the packages
listed in the 'world' file are retained.

Remaining issue:
There is no ABI version information in any of the apk files, so
the returned file names have not been cleaned.  This is contrary
to the opkg version, which cleaned the package names, and is a bug
that needs to be fixed once the ABI version are available.

Fixes: openwrt/openwrt#16907
Fixes: efahl/owut#22
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/rpcd/pull/10
Signed-off-by: Robert Marko <robimarko@gmail.com>
sys.c