[build]: DPKG caching fix for evaluation bugs (#4425)
Added DPKG support for ICCPD package Added warning support for missing dependency files that causes the incorrect SHA generation.
This commit is contained in:
parent
87f2dbd75f
commit
7b53ae3b07
@ -172,8 +172,14 @@ define GET_MOD_DEP_SHA
|
||||
$(if $($(dfile)_MAIN_DEB),$($(dfile)_MAIN_DEB),$(dfile))) )
|
||||
|
||||
$(if $(MDEBUG), $(info $(1)_MOD_DEP_PKGS: $($(1)_MOD_DEP_PKGS)))
|
||||
$(eval $(1)_DEP_MOD_SHA := $(shell git hash-object \
|
||||
$(foreach dfile,$($(1)_MOD_DEP_PKGS), $($(dfile)_DEP_FLAGS_FILE) $($(dfile)_MOD_HASH_FILE) $($(dfile)_SMOD_HASH_FILE) ) \
|
||||
|
||||
# Warn if there is any missing dependency files
|
||||
$(eval $(1)_DEP_MOD_SHA_FILES := $(foreach dfile,$($(1)_MOD_DEP_PKGS), \
|
||||
$($(dfile)_DEP_FLAGS_FILE) $($(dfile)_MOD_HASH_FILE) $($(dfile)_SMOD_HASH_FILE)) )
|
||||
$(eval $(1)_DEP_FILES_MISSING := $(filter-out $(wildcard $($(1)_DEP_MOD_SHA_FILES)),$($(1)_DEP_MOD_SHA_FILES)) )
|
||||
$(if $($(1)_DEP_FILES_MISSING), $(warning "[ DPKG ] Dependecy file(s) are not found for $(1) : $($(1)_DEP_FILES_MISSING)))
|
||||
|
||||
$(eval $(1)_DEP_MOD_SHA := $(shell git hash-object $($(1)_DEP_MOD_SHA_FILES) \
|
||||
| sha1sum | awk '{print substr($$1,0,23);}'))
|
||||
endef
|
||||
|
||||
|
11
rules/docker-iccpd.dep
Normal file
11
rules/docker-iccpd.dep
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
DPATH := $($(DOCKER_ICCPD)_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-iccpd.mk rules/docker-iccpd.dep
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
DEP_FILES += $(shell git ls-files $(DPATH))
|
||||
|
||||
$(DOCKER_ICCPD)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(DOCKER_ICCPD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(DOCKER_ICCPD)_DEP_FILES := $(DEP_FILES)
|
||||
|
||||
$(eval $(call add_dbg_docker,$(DOCKER_ICCPD),$(DOCKER_ICCPD_DBG)))
|
10
rules/iccpd.dep
Normal file
10
rules/iccpd.dep
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
SPATH := $($(ICCPD)_SRC_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/iccpd.mk rules/iccpd.dep
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
DEP_FILES += $(shell git ls-files $(SPATH))
|
||||
|
||||
$(ICCPD)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(ICCPD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(ICCPD)_DEP_FILES := $(DEP_FILES)
|
||||
|
Loading…
Reference in New Issue
Block a user