Skip to content

Commit

Permalink
[build]: Fixes the DPKG cache break because of SAI package content ch…
Browse files Browse the repository at this point in the history
…anges without changing its version (sonic-net#5651)

- The issue is that the SAI package content is changed without changing its version. The DPKG caches the wrong version of SAI package. 
- The fix is to include the SAI package content header for SHA calcaulation. This will detect if there is any change in the SAI package.
  • Loading branch information
Kalimuthu-Velappan authored Oct 17, 2020
1 parent bef76b1 commit b57272f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions platform/broadcom/sai.dep
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
SPATH := $($(BRCM_SAI)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/sai.mk platform/broadcom/sai.dep
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}' )

$(BRCM_SAI)_CACHE_MODE := GIT_CONTENT_SHA
$(BRCM_SAI)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(BRCM_SAI)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(SAI_FLAGS)
$(BRCM_SAI)_DEP_FILES := $(DEP_FILES)


$(BRCM_SAI_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(BRCM_SAI_DEV)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(BRCM_SAI_DEV)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(SAI_FLAGS)
$(BRCM_SAI_DEV)_DEP_FILES := $(DEP_FILES)

0 comments on commit b57272f

Please sign in to comment.