[openwrt/openwrt] build: create package index.json

LEDE Commits lede-commits at lists.infradead.org
Tue Nov 12 09:35:30 PST 2024


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f84187035e96d6d9912deebc25822910a7d539a5

commit f84187035e96d6d9912deebc25822910a7d539a5
Author: Eric Fahlgren <ericfahlgren at gmail.com>
AuthorDate: Tue Nov 12 09:10:02 2024 -0800

    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 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/16931
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

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 ( \




More information about the lede-commits mailing list