From 5b5f3f06f019fa0947ea65c78f08f82a69e435fd Mon Sep 17 00:00:00 2001 From: liuh-80 <58683130+liuh-80@users.noreply.github.com> Date: Fri, 22 Oct 2021 10:29:12 +0800 Subject: [PATCH] [Bash] Fix bash build break when re-build bash issue. (#9027) This pull request will fix bash build break issue when re-build bash. #### Why I did it src/bash project using quilt to manage patches, and quilt can't apply patch correctly when cache folder '.pc' is not clean. #### How I did it Add command in make file to remove quilt cache folder before apply patches. #### How to verify it Re-build bash target target/debs/buster/bash_5.1-2_amd64.deb to validate this fix work. Pass all UT. #### Which release branch to backport (provide reason below if selected) N/A #### Description for the changelog Fix bash build break issue when re-build bash. #### A picture of a cute animal (not mandatory but encouraged) --- src/bash/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bash/Makefile b/src/bash/Makefile index b294e6e1c40d..0d1b3817134d 100644 --- a/src/bash/Makefile +++ b/src/bash/Makefile @@ -5,6 +5,8 @@ SHELL = /bin/bash MAIN_TARGET = bash_$(BASH_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : + # Quilt store applied patches info in .pc folder, if this folder not clean, quilt can't apply patches correctly. + rm -rf .pc rm -rf bash-$(BASH_VERSION_MAJOR) dget -u https://launchpad.net/debian/+archive/primary/+sourcefiles/bash/$(BASH_VERSION_FULL)/bash_$(BASH_VERSION_FULL).dsc