Fix docker images rebuilt issue when building each host image (#5925)
* Change back the mtime changed by applying patch * Fix bug * Fix bug * Use the grep or pattern instead to call a new grep command
This commit is contained in:
parent
962e838b16
commit
98d749128a
@ -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))
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user