Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker images rebuilt issue when building each host image #5925

Merged
merged 6 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find an issue that if I modify a file in a submodule, the corresponding packages could not be rebuilt. Eg, src/sonic-swss/cfgmgr/portmgr.cpp is modified,and make swss.deb will not be rebuilt, only swss.smdep and swss.smdep.smsha update, swss.dep is not touched, so target of swss.deb will not be executed.

@$$(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