summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fahlgren2024-11-12 17:10:02 +0000
committerChristian Marangi2024-11-12 17:34:51 +0000
commitf84187035e96d6d9912deebc25822910a7d539a5 (patch)
tree47070df324bf8b3827be5fed0b4794158cc946b3
parenta72c8c770584075782959f2aa5c1487d68517edd (diff)
downloadopenwrt-f84187035e96d6d9912deebc25822910a7d539a5.tar.gz
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>
-rw-r--r--package/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/Makefile b/package/Makefile
index b60ed10fb6..88d312d4ed 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -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 ( \