forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#47/%20869] build: (minor) frr keeps changing after build
- Loading branch information
Sonic-builder OSSO
committed
Nov 22, 2024
1 parent
7af2c72
commit e83d437
Showing
1 changed file
with
13 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,29 +13,27 @@ export DEBEMAIL := [email protected] | |
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
# Build the package | ||
pushd ./frr | ||
git checkout -b $(FRR_BRANCH) origin/$(FRR_BRANCH) || git checkout $(FRR_BRANCH) | ||
ifeq ($(CROSS_BUILD_ENVIRON), y) | ||
git reset --hard | ||
endif | ||
stg branch --create $(STG_BRANCH) $(FRR_TAG) | ||
git fetch --all | ||
|
||
oldbranch=$$(git describe --always) | ||
if ! git checkout $(FRR_BRANCH)-sonic; then | ||
git checkout -b $(FRR_BRANCH)-sonic origin/$(FRR_BRANCH) | ||
fi | ||
git clean -xdf | ||
git reset --hard origin/$(FRR_BRANCH) | ||
git branch --list 'stg_temp.*' | sed -e '/^[*] /d' | xargs --no-run-if-empty git branch -D | ||
|
||
stg branch --create $(STG_BRANCH)-sonic $(FRR_TAG) | ||
stg import -s ../patch/series | ||
|
||
gbp dch --ignore-branch --new-version=$(FRR_VERSION)-sonic-$(FRR_SUBVERSION) --dch-opt="--force-bad-version" --commit --git-author | ||
|
||
ifeq ($(CROSS_BUILD_ENVIRON), y) | ||
CFLAGS="-I $$CROSS_PERL_CORE_PATH" dpkg-buildpackage -rfakeroot -b -d -us -uc -Ppkg.frr.nortrlib -a$(CONFIGURED_ARCH) -Pcross,nocheck -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) | ||
else | ||
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) | ||
endif | ||
stg undo || true | ||
git clean -xfdf | ||
git checkout $(FRR_BRANCH) | ||
stg branch --delete --force $(STG_BRANCH) | ||
git rev-parse --short HEAD | xargs git checkout | ||
ifeq ($(CROSS_BUILD_ENVIRON), y) | ||
git reset --hard | ||
endif | ||
git checkout master | ||
git branch -D $(FRR_BRANCH) | ||
git checkout "$$oldbranch" | ||
popd | ||
mv $(DERIVED_TARGET) $* $(DEST)/ | ||
|
||
|