sonic-buildimage/rules/frr.dep
Liu Shilong be7a95b042
[build] Fix frr dpkg cache calculation issue on symbolic link file. (#16700)
Why I did it
Now build will fail on:

fatal: Unable to hash src/sonic-frr/frr/tests/topotests/grpc_basic/lib
fatal: Unable to hash src/sonic-frr/frr/tests/topotests/ospfapi/lib
make: *** [Makefile.cache:528: target/debs/buster/frr_8.5.1-sonic-0_amd64.deb.smdep] Error 123
make: *** Waiting for unfinished jobs....
Root cause is that these files are symbol links.
git hash-object can't hash symbol links.

Work item tracking
Microsoft ADO (number only): 25271730
How I did it
These two files are symbol links.
When calculate sha value, skip these two files.
2023-09-28 18:04:31 +08:00

28 lines
1.3 KiB
Plaintext

SPATH := $($(FRR)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/frr.mk rules/frr.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files |grep -Ev '^frr$$$$'))
# Account for source files under the frr submodule directory as well.
# Remove all the symbolic link files
FRR_SPATH := $(SPATH)/frr
SMDEP_FILES := $(addprefix $(FRR_SPATH)/,$(shell cd $(FRR_SPATH) && git ls-files \
| grep -Ev -e 'debian/changelog$$$$' \
-e '^tests/topotests/grpc_basic/lib$$$$' \
-e '^tests/topotests/ospfapi/lib$$$$' \
-e '^tests/topotests/bgp_instance_del_test/ce[0-9]$$$$' \
-e '^tests/topotests/bgp_instance_del_test/r[0-9]$$$$' \
-e '^tests/topotests/bgp_instance_del_test/scripts$$$$' \
-e '^tests/topotests/bgp_instance_del_test/customize.py$$$$' \
-e '^tests/topotests/bgp_rfapi_basic_sanity_config2/customize.py$$$$' \
-e '^tests/topotests/bgp_rfapi_basic_sanity_config2/scripts$$$$' \
-e '^tests/topotests/bgp_rfapi_basic_sanity_config2/test_bgp_rfapi_basic_sanity_config2.py$$$$' \
))
$(FRR)_CACHE_MODE := GIT_CONTENT_SHA
$(FRR)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(FRR)_DEP_FILES := $(DEP_FILES)
$(FRR)_SMDEP_FILES := $(SMDEP_FILES)
$(FRR)_SMDEP_PATHS := $(FRR_SPATH)