build: create package index.json

Duplicate the old opkg index.json using the new apk database.
Needed to get the ASU server working on new snapshots.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16931
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Eric Fahlgren 2024-11-12 09:10:02 -08:00 committed by Christian Marangi
parent a72c8c7705
commit f84187035e
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
1 changed files with 5 additions and 0 deletions

View File

@ -131,6 +131,11 @@ ifneq ($(CONFIG_USE_APK),)
--sign $(BUILD_KEY_APK_SEC) \
--output packages.adb \
$$(ls *.apk | grep -v 'base-files-\|kernel-\|libc-'); \
echo -n '{"architecture": "$(ARCH_PACKAGES)", "packages":{' > index.json; \
$(STAGING_DIR_HOST)/bin/apk adbdump packages.adb | \
awk '/- name: / {pkg = $$NF} ; / version: / {printf "\"%s\": \"%s\", ", pkg, $$NF}' | \
sed 's/, $$//' >> index.json; \
echo '}}' >> index.json; \
done
else
@for d in $(PACKAGE_SUBDIRS); do ( \