]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
build: propagate errors when generating apk indexes 21993/head
authorMatt Merhar <mattmerhar@protonmail.com>
Wed, 11 Feb 2026 19:33:15 +0000 (14:33 -0500)
committerRobert Marko <robimarko@gmail.com>
Fri, 13 Feb 2026 20:17:21 +0000 (21:17 +0100)
The build would continue even if the some of the intermediate commands
failed, as long as the last command in the final iteration of the loop
was successful.

Add 'set -e' to the subshell so that we immediately exit. Previously,
only the exit status of the final make-index-json.py mattered.

Fixes: https://github.com/openwrt/openwrt/issues/21981
Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/21993
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/Makefile

index 7e69b9a0b535064141c180ea5a4f6c7d47b026f1..b5581f9859d0b4a8ef8a4c24c44eed75908171c3 100644 (file)
@@ -129,6 +129,7 @@ $(curdir)/index: FORCE
        @echo Generating package index...
 ifneq ($(CONFIG_USE_APK),)
        @for d in $(PACKAGE_SUBDIRS); do \
+               set -e; \
                mkdir -p $$d; \
                cd $$d || continue; \
                ls *.apk >/dev/null 2>&1 || continue; \