imagebuilder: fix repeated generation of package index when signing is enabled
authorLiangbin Lian <[email protected]>
Wed, 8 May 2024 04:57:11 +0000 (12:57 +0800)
committerLiangbin Lian <[email protected]>
Wed, 12 Nov 2025 13:23:33 +0000 (21:23 +0800)
`$(MAKE) package_index` will generate Packages.sig if signing is enabled, and Packages.sig is always newer than Packages.gz, cause repeated generation of package index on next build. So we should ignore Packages.sig.

Signed-off-by: Liangbin Lian <[email protected]>
target/imagebuilder/files/Makefile

index 3f919a06589e9ed0d345d503edac8d3e4f102ebb..ee40612c1fd59ec15b54bc8ee6693e685e5489df 100644 (file)
@@ -194,7 +194,7 @@ ifeq ($(CONFIG_USE_APK),)
        if [ -d "$(PACKAGE_DIR)" ] && ( \
                        [ ! -f "$(PACKAGE_DIR)/Packages" ] || \
                        [ ! -f "$(PACKAGE_DIR)/Packages.gz" ] || \
-                       [ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/Packages.gz`" ] ); then \
+                       [ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/Packages.gz ! -name Packages.sig`" ] ); then \
                echo "Package list missing or not up-to-date, generating it." >&2 ;\
                $(MAKE) package_index; \
        else \