Skip to content

Commit

Permalink
Fix docker images rebuilt issue when building each host image (sonic-…
Browse files Browse the repository at this point in the history
…net#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
  • Loading branch information
xumia authored and santhosh-kt committed Feb 25, 2021
1 parent 6b4751d commit 55e9c8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Makefile.cache
Original file line number Diff line number Diff line change
Expand Up @@ -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 >[email protected]
@$$(file >[email protected],$$($$*_DEP_FILES))
@cat [email protected] |xargs git hash-object >[email protected]
@if ! cmp -s [email protected] [email protected]; then cp [email protected] $$@; cp [email protected] [email protected]; fi
@rm -f [email protected] [email protected]
@$$(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))
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/sai.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion rules/sonic-config.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 55e9c8c

Please sign in to comment.