[frr]: Fix the issue 'branch already exist' in frr package rebuilds (#3692)
Fixed Makefile of FRR. Before we had issues after #3589: - When you want to rebuild frr with new changes you get error "branch frr/7.1 is already exist". - When your patch list is empty stg undo gives an error
This commit is contained in:
parent
4b59a430f1
commit
d85777bb11
@ -4,8 +4,9 @@ SHELL = /bin/bash
|
||||
|
||||
MAIN_TARGET = $(FRR)
|
||||
DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_DBG) $(FRR_SNMP) $(FRR_SNMP_DBG)
|
||||
SUFFIX = $(shell date +%Y%m%d\.%H%M%S)
|
||||
FRR_BRANCH = frr/$(FRR_VERSION)
|
||||
STG_BRANCH = stg_temp
|
||||
STG_BRANCH = stg_temp.$(SUFFIX)
|
||||
|
||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
# Build the package
|
||||
@ -15,11 +16,12 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
stg import -s ../patch/series
|
||||
tools/tarsource.sh -V -e '-sonic'
|
||||
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS)
|
||||
stg undo
|
||||
stg undo || true
|
||||
git clean -xfdf
|
||||
git checkout $(FRR_BRANCH)
|
||||
stg branch --delete $(STG_BRANCH)
|
||||
git rev-parse --short HEAD | xargs git checkout
|
||||
git checkout master
|
||||
git branch -D $(FRR_BRANCH)
|
||||
popd
|
||||
mv $(DERIVED_TARGET) $* $(DEST)/
|
||||
|
Reference in New Issue
Block a user