diff --git a/Makefile.cache b/Makefile.cache index 4d15cdbf1..cce4dedb6 100644 --- a/Makefile.cache +++ b/Makefile.cache @@ -558,8 +558,10 @@ ALL_DEP_FILES_LIST += $(foreach pkg,$(2), $($(filter none,$($(1)_CACHE_MODE)), \ $(addsuffix .$(3),$(addprefix $(2)/, $(1))) : $(2)/%.$(3) : \ $(2)/%.flags $$$$($$$$*_DEP_FILES) $$$$(if $$$$($$$$*_SMDEP_FILES), $(2)/%.smdep) @$$(eval $$*_DEP_FILES_MODIFIED := $$? ) - @$$(file >$$@,$$($$*_DEP_FILES)) - @cat $$@ |xargs git hash-object >$$@.sha + @$$(file >$$@.tmp,$$($$*_DEP_FILES)) + @cat $$@.tmp |xargs git hash-object >$$@.sha.tmp + @if ! cmp -s $$@.sha.tmp $$@.sha; then cp $$@.tmp $$@; cp $$@.sha.tmp $$@.sha; fi + @rm -f $$@.tmp $$@.sha.tmp @$$(if $$(MDEBUG), $$(info DEP: $$@, MOD:$$?)) endef $(eval $(call SHA_DEP_RULES, $(SONIC_MAKE_DEBS) $(SONIC_DPKG_DEBS) $(SONIC_ONLINE_DEBS) $(SONIC_COPY_DEBS), $(DEBS_PATH),dep)) diff --git a/platform/broadcom/sai.dep b/platform/broadcom/sai.dep index 21455ca54..c5b10a4e9 100644 --- a/platform/broadcom/sai.dep +++ b/platform/broadcom/sai.dep @@ -5,7 +5,7 @@ DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/sai.mk platform/broa DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) # Get the Latest HTTP Header and calculate the SHA value as it is a softlink that always points to LATEST_INT_OCP_SAI_X.X.X SAI_FLAGS := $(shell wget --spider --server-response $($(BRCM_SAI)_URL) $($(BRCM_SAI_DEV)_URL) 2>&1 \ - | grep -Ev -- '--|Date:'|sha256sum|awk '{print $$1}' ) + | grep -Ev -- '--|Date:|x-ms-request-id'|sha256sum|awk '{print $$1}' ) $(BRCM_SAI)_CACHE_MODE := GIT_CONTENT_SHA $(BRCM_SAI)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(SAI_FLAGS) diff --git a/rules/sonic-config.dep b/rules/sonic-config.dep index a606bb130..148e43a96 100644 --- a/rules/sonic-config.dep +++ b/rules/sonic-config.dep @@ -12,7 +12,6 @@ $(SONIC_CONFIG_ENGINE_PY2)_DEP_FILES := $(DEP_FILES) # SONIC_CONFIG_ENGINE_PY3 package SPATH := $($(SONIC_CONFIG_ENGINE_PY3)_SRC_PATH) -DEP_FILES += $(shell git ls-files $(SPATH)) $(SONIC_CONFIG_ENGINE_PY3)_CACHE_MODE := GIT_CONTENT_SHA $(SONIC_CONFIG_ENGINE_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)