From a0e191667cac3447017c29fd76cad6843b045b58 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 18 Sep 2026 19:06:56 +0200 Subject: [PATCH] build: exclude apk staging dirs from the autorebuild check The rdep check on PKG_BUILD_DIR excludes the ipkg-* staging dirs, but not the apk-* ones. The package step writes the apk scripts after .built is touched. If this crosses a second boundary, the next build sees newer files and packs the package again, which starts the loop again. The kernel package with its kmods takes several seconds to pack and is repacked on every build. Anchor the pattern to PKG_BUILD_DIR, as a plain "*/apk-*" also matches the build dir of the apk package itself. Signed-off-by: John Crispin --- include/package.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/package.mk b/include/package.mk index 8fedbc6e8b4..b0820b006eb 100644 --- a/include/package.mk +++ b/include/package.mk @@ -195,7 +195,7 @@ ifeq ($(DUMP)$(filter prereq clean refresh update,$(MAKECMDGOALS)),) define Build/Autoclean $(PKG_BUILD_DIR)/.dep_files: $(STAMP_PREPARED) $(call rdep,${CURDIR} $(PKG_FILE_DEPENDS),$(STAMP_PREPARED),$(PKG_BUILD_DIR)/.dep_files,-x "*/.dep_*") - $(if $(filter prepare,$(MAKECMDGOALS)),,$(call rdep,$(PKG_BUILD_DIR),$(STAMP_BUILT),,-x "*/.dep_*" -x "*/ipkg*")) + $(if $(filter prepare,$(MAKECMDGOALS)),,$(call rdep,$(PKG_BUILD_DIR),$(STAMP_BUILT),,-x "*/.dep_*" -x "*/ipkg*" -x "$(PKG_BUILD_DIR)/apk-*")) endef endif endif