imagebuilder: implement STRIP_ABI option for manifest target

When using apk as the package manager, imagebuilder make command

    make manifest STRIP_ABI=1

does not strip package names of their ABI-version suffix.  The ASU
server relies on this to validate builds, so many snapshot build
requests are failing.

Fix this by using the already existing package data parser in
make-index-json.py and augment it to write the result in manifest
format.

Fixes: https://github.com/openwrt/openwrt/issues/19274
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19278
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Eric Fahlgren
2025-07-01 14:02:41 -07:00
committed by Robert Marko
parent 9d31db2833
commit 23dc466969
2 changed files with 19 additions and 8 deletions

View File

@@ -168,7 +168,8 @@ _call_manifest: FORCE
ifeq ($(CONFIG_USE_APK),)
$(OPKG) list-installed $(if $(STRIP_ABI),--strip-abi)
else
$(APK) list --quiet --manifest --no-network
$(APK) query --format json --fields name,version,$(if $(STRIP_ABI),tags) --installed '*' | \
$(SCRIPT_DIR)/make-index-json.py -a $(ARCH_PACKAGES) -f apk --manifest -
endif
package_index: FORCE