[build] Fix cache caculation, by adding _FILES to cache dependency file list. (#15473)
Why I did it When SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT changed, almost all dockers need to be built again. But currently it will be loaded by cache. Work item tracking Microsoft ADO (number only): 25123348 How I did it Add $(DOCKER)_FILES into dependencies.
This commit is contained in:
parent
4b3fe709f1
commit
1a62e24105
@ -564,10 +564,12 @@ ALL_DEP_FILES_LIST += $(foreach pkg,$(2), $($(filter none,$($(1)_CACHE_MODE)), \
|
||||
$(addsuffix .$(3).sha,$(addprefix $(pkg)/, $(1)))))
|
||||
$(foreach docker, $(filter $(SONIC_DOCKER_IMAGES), $(1)), \
|
||||
$(eval $(docker)_DEP_FILES+=$(wildcard files/build/versions/default/*) \
|
||||
$(wildcard files/build/versions/dockers/$(basename $(docker))/*)))
|
||||
$(wildcard files/build/versions/dockers/$(basename $(docker))/*) \
|
||||
$(foreach docker_file, $($(docker)_FILES), $(addprefix $(if $($(docker_file)_PATH), $($(docker_file)_PATH), $(FILES_PATH))/, $(docker_file))) ))
|
||||
$(foreach docker, $(filter $(SONIC_DOCKER_DBG_IMAGES), $(1)), \
|
||||
$(eval $(docker)_DEP_FILES+=$(wildcard files/build/versions/default/*) \
|
||||
$(wildcard files/build/versions/dockers/$(patsubst %-$(DBG_IMAGE_MARK).gz,%,$(docker))/*)))
|
||||
$(wildcard files/build/versions/dockers/$(patsubst %-$(DBG_IMAGE_MARK).gz,%,$(docker))/*) \
|
||||
$(foreach docker_file, $($(docker)_FILES), $(addprefix $(if $($(docker_file)_PATH), $($(docker_file)_PATH), $(FILES_PATH))/, $(docker_file))) ))
|
||||
$(addsuffix .$(3),$(addprefix $(2)/, $(1))) : $(2)/%.$(3) : \
|
||||
$(2)/%.flags $$$$($$$$*_DEP_FILES) $$$$(if $$$$($$$$*_SMDEP_FILES), $(2)/%.smdep)
|
||||
@$$(eval $$*_DEP_FILES_MODIFIED := $$? )
|
||||
|
@ -30,6 +30,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_EVENTD)
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_EVENTD_DBG)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_EVENTD_DBG)
|
||||
|
||||
$(DOCKER_EVENTD)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
|
||||
$(DOCKER_EVENTD)_CONTAINER_NAME = eventd
|
||||
$(DOCKER_EVENTD)_RUN_OPT += --privileged -t
|
||||
$(DOCKER_EVENTD)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
Loading…
Reference in New Issue
Block a user