[Bug][Build]: Fix the mlnx-platform-api dpkg cache config error (#9705)

Failed to build the mellanox image when dpkg enabled, it has impact on PR checks.
This commit is contained in:
xumia 2022-01-09 09:21:59 +08:00 committed by GitHub
parent bdb84ff996
commit 3e46582314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,14 +1,16 @@
# DPKG FRK
SPATH := $($(SONIC_PLATFORM_API_PY2)_SRC_PATH)
SPATH := $($(SONIC_PLATFORM_API_PY3)_SRC_PATH)
SLINKS := $(shell find $(SPATH) -type l -exec echo {} \; | grep -Ev ' ')
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/mlnx-platform-api.mk $(PLATFORM_PATH)/mlnx-platform-api.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files -- $(SPATH) | grep -Ev ' ')
$(SONIC_PLATFORM_API_PY2)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_PLATFORM_API_PY2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_PLATFORM_API_PY2)_DEP_FILES := $(filter-out $(SLINKS),$(DEP_FILES))
ifeq ($(ENABLE_PY2_MODULES), y)
$(SONIC_PLATFORM_API_PY2)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_PLATFORM_API_PY2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_PLATFORM_API_PY2)_DEP_FILES := $(filter-out $(SLINKS),$(DEP_FILES))
endif
$(SONIC_PLATFORM_API_PY3)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_PLATFORM_API_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)