Skip to content

Commit

Permalink
[build]Fix FRR build cache issue (#16713)
Browse files Browse the repository at this point in the history
### Why I did it
When FRR is built with Cache enabled, the build failed with the following error logs
```
[2023-09-20T15:17:00.273Z] fatal: Unable to hash src/sonic-frr/frr/tests/topotests/grpc_basic/lib
[2023-09-20T15:17:00.273Z] fatal: Unable to hash src/sonic-frr/frr/tests/topotests/ospfapi/lib
[2023-09-20T15:17:00.273Z] make: *** [Makefile.cache:528: target/debs/bullseye/frr_8.5.1-sonic-0_amd64.deb.smdep] Error 123
[2023-09-20T15:17:00.273Z] make: *** Waiting for unfinished jobs....
```
#### How I did it
Currently symlinks are excluded in hardcoded fashion. With FRR upgrades new symlinks might get introduced. To overcome it modified the way in which symlinks are excluded by finding symlinks using find command

#### How to verify it
Build FRR with cache enabled
  • Loading branch information
dgsudharsan committed Sep 29, 2023
1 parent b1a8634 commit 2afd382
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions rules/frr.dep
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,7 @@ DEP_FILES += $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files |grep -
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$$$$' \
-e "$(find -L tests/ -xtype l)" \
))

$(FRR)_CACHE_MODE := GIT_CONTENT_SHA
Expand Down

0 comments on commit 2afd382

Please sign in to comment.