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>