[Build] Fix the build exit unexpected in false condition in Makefile issue#12814
Merged
xumia merged 1 commit intosonic-net:masterfrom Nov 24, 2022
Merged
[Build] Fix the build exit unexpected in false condition in Makefile issue#12814xumia merged 1 commit intosonic-net:masterfrom
xumia merged 1 commit intosonic-net:masterfrom
Conversation
liushilongbuaa
approved these changes
Nov 24, 2022
StormLiangMS
pushed a commit
to StormLiangMS/sonic-buildimage
that referenced
this pull request
Dec 8, 2022
…issue (sonic-net#12814) #### Why I did it When build the sonic-slave-bash target, it cannot go to the shell failed in the step to build sonic-build-hooks, the error logs as below. It may have impact on some of the users, it may be relative to different version of the make. ``` $ QUIET=n BLDENV=bullseye make NOJESSIE=1 NOSTRETCH=1 sonic-slave-bash +++ Making sonic-slave-bash +++ BLDENV=buster make -f Makefile.work sonic-slave-bash make[1]: Entering directory `/builds2/stephens/wip/update-submodule/sonic-buildimage' echo -n "" pushd src/sonic-build-hooks; TRUSTED_GPG_URLS=https://packages.trafficmanager.net/debian/public_key.gpg,https://packages.microsoft.com/keys/microsoft.asc make all; popd /builds2/stephens/wip/update-submodule/sonic-buildimage/src/sonic-build-hooks /builds2/stephens/wip/update-submodule/sonic-buildimage make[2]: Entering directory `/builds2/stephens/wip/update-submodule/sonic-buildimage/src/sonic-build-hooks' dpkg-deb: building package 'sonic-build-hooks' in 'buildinfo/sonic-build-hooks_1.0_all.deb'. make[2]: Leaving directory `/builds2/stephens/wip/update-submodule/sonic-buildimage/src/sonic-build-hooks' /builds2/stephens/wip/update-submodule/sonic-buildimage mkdir -p sonic-slave-buster/buildinfo cp src/sonic-build-hooks/buildinfo/sonic-build-hooks* sonic-slave-buster/buildinfo [ "n" == y ] && scripts/build_mirror_config.sh sonic-slave-buster amd64 buster make[1]: *** [sonic-build-hooks] Error 1 make[1]: Leaving directory `/builds2/stephens/wip/update-submodule/sonic-buildimage' make: *** [sonic-slave-bash] Error 2 ``` #### How I did it Change the format as below: ``` [ xxx = yyy ] && do something ``` To ``` if [ xxx = yyy ]; then do something; if ``` #### How to verify it Verified by who found the issue, the issue gone when the patch applied.
StormLiangMS
pushed a commit
that referenced
this pull request
Dec 10, 2022
…issue (#12814) #### Why I did it When build the sonic-slave-bash target, it cannot go to the shell failed in the step to build sonic-build-hooks, the error logs as below. It may have impact on some of the users, it may be relative to different version of the make. ``` $ QUIET=n BLDENV=bullseye make NOJESSIE=1 NOSTRETCH=1 sonic-slave-bash +++ Making sonic-slave-bash +++ BLDENV=buster make -f Makefile.work sonic-slave-bash make[1]: Entering directory `/builds2/stephens/wip/update-submodule/sonic-buildimage' echo -n "" pushd src/sonic-build-hooks; TRUSTED_GPG_URLS=https://packages.trafficmanager.net/debian/public_key.gpg,https://packages.microsoft.com/keys/microsoft.asc make all; popd /builds2/stephens/wip/update-submodule/sonic-buildimage/src/sonic-build-hooks /builds2/stephens/wip/update-submodule/sonic-buildimage make[2]: Entering directory `/builds2/stephens/wip/update-submodule/sonic-buildimage/src/sonic-build-hooks' dpkg-deb: building package 'sonic-build-hooks' in 'buildinfo/sonic-build-hooks_1.0_all.deb'. make[2]: Leaving directory `/builds2/stephens/wip/update-submodule/sonic-buildimage/src/sonic-build-hooks' /builds2/stephens/wip/update-submodule/sonic-buildimage mkdir -p sonic-slave-buster/buildinfo cp src/sonic-build-hooks/buildinfo/sonic-build-hooks* sonic-slave-buster/buildinfo [ "n" == y ] && scripts/build_mirror_config.sh sonic-slave-buster amd64 buster make[1]: *** [sonic-build-hooks] Error 1 make[1]: Leaving directory `/builds2/stephens/wip/update-submodule/sonic-buildimage' make: *** [sonic-slave-bash] Error 2 ``` #### How I did it Change the format as below: ``` [ xxx = yyy ] && do something ``` To ``` if [ xxx = yyy ]; then do something; if ``` #### How to verify it Verified by who found the issue, the issue gone when the patch applied.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
When build the sonic-slave-bash target, it cannot go to the shell failed in the step to build sonic-build-hooks, the error logs as below. It may have impact on some of the users, it may be relative to different version of the make.
How I did it
Change the format as below:
To
How to verify it
Verified by who found the issue, the issue gone when the patch applied.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)