build: only overwrite ABI version for provided packages when base version changed
authorFelix Fietkau <nbd@nbd.name>
Mon, 15 Feb 2021 17:53:42 +0000 (18:53 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 15 Feb 2021 17:56:50 +0000 (18:56 +0100)
Should avoid some spurious rebuilds

Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/package-ipkg.mk

index eaa80ebc75c5608d3e5af70e0361dd3f08309380..a8210f8e31e0916034a7ba83e582cd99629e2ca7 100644 (file)
@@ -156,12 +156,12 @@ ifeq ($(DUMP),)
 
     $(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
        mkdir -p $(STAGING_DIR_ROOT)/stamp
-       $(if $(ABI_VERSION),echo '$(ABI_VERSION)' | cmp -s - $(PKG_INFO_DIR)/$(1).version || \
-               echo '$(ABI_VERSION)' > $(PKG_INFO_DIR)/$(1).version \
-               $(foreach pkg,$(filter-out $(1),$(PROVIDES)),; \
-                       cp $(PKG_INFO_DIR)/$(1).version $(PKG_INFO_DIR)/$(pkg).version \
+       $(if $(ABI_VERSION),echo '$(ABI_VERSION)' | cmp -s - $(PKG_INFO_DIR)/$(1).version || \
+               echo '$(ABI_VERSION)' > $(PKG_INFO_DIR)/$(1).version; \
+               $(foreach pkg,$(filter-out $(1),$(PROVIDES)), \
+                       cp $(PKG_INFO_DIR)/$(1).version $(PKG_INFO_DIR)/$(pkg).version; \
                ) \
-       )
+       )
        $(call locked,$(CP) $(PKG_BUILD_DIR)/.pkgdir/$(1)/. $(STAGING_DIR_ROOT)/,root-copy)
        touch $$@