[sonic_debian_extension] fix packages.json generation and make the build fail when packages.json is not generated#8044
Merged
lguohan merged 3 commits intosonic-net:masterfrom Jul 9, 2021
Conversation
…ild fail when packages.json is not generated Signed-off-by: Stepan Blyschak <[email protected]>
Collaborator
Author
|
Required to be backported to 202106. |
judyjoseph
reviewed
Jul 7, 2021
| { | ||
| {% for docker_installation_target in installer_images.strip().split() -%} | ||
| {% set pkgname, docker_build_path, image = docker_installation_target.split('|') -%} | ||
| {% set pkgname, docker_build_path, _, image = docker_installation_target.split('|') -%} |
Contributor
There was a problem hiding this comment.
Thanks for the fix. I feel we need extract the machine and compare machine with $TARGET_MACHINE in j2 syntax in packages.json.j2. You could pass the TARGET_MACHINE as a environment variable when j2 command for generating packages.json is invoked.
MACHINE=$TARGET_MACHINE j2 $BUILD_TEMPLATES/packages.json.j2 | sudo tee $FILESYSTEM_ROOT/$SONIC_PACKAGE_MANAGER_FOLDER/packages.json
Collaborator
Author
There was a problem hiding this comment.
@judyjoseph Thanks for suggestion, I am not really familiar with new concept of machine. I'll investigate and reply.
Signed-off-by: Stepan Blyschak <[email protected]>
4 tasks
judyjoseph
approved these changes
Jul 8, 2021
judyjoseph
pushed a commit
that referenced
this pull request
Jul 13, 2021
…ild fail when packages.json is not generated (#8044) After #7598 the packages.json generation is broken. This change fixes it make the whole build fail in case generation failed. Signed-off-by: Stepan Blyschak <[email protected]>
carl-nokia
pushed a commit
to carl-nokia/sonic-buildimage
that referenced
this pull request
Aug 7, 2021
…ild fail when packages.json is not generated (sonic-net#8044) After sonic-net#7598 the packages.json generation is broken. This change fixes it make the whole build fail in case generation failed. Signed-off-by: Stepan Blyschak <[email protected]>
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.
Signed-off-by: Stepan Blyschak [email protected]
Why I did it
Closes issue #8032
After
https://github.com/Azure/sonic-buildimage/pull/7598the packages.json generation is broken. This change fixes it make the whole build fail in case generation failed.How I did it
Fix and check if generation failed.
How to verify it
Build sonic image, verify presence of the file.
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)