Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with INSTALL_DEBUG_TOOLS=y #7940

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

msosyak
Copy link
Contributor

@msosyak msosyak commented Jun 22, 2021

During SONiC build with INSTALL_DEBUG_TOOLS=y an exception is raised:

[ 01 ] [ target/docker-sonic-mgmt-framework-dbg.gz ]
Traceback (most recent call last):
  File "/usr/local/bin/j2", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/j2cli/cli.py", line 206, in main
    sys.argv[1:]
  File "/usr/local/lib/python2.7/dist-packages/j2cli/cli.py", line 186, in render_command
    result = renderer.render(args.template, context)
  File "/usr/local/lib/python2.7/dist-packages/j2cli/cli.py", line 87, in render
    .render(context) \
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/sonic/dockers/docker-sonic-mgmt-framework/Dockerfile.j2", line 21, in top-level template code
    {% for deb in docker_sonic_mgmt_framework_debs.split(' ') -%}
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 430, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'docker_sonic_mgmt_framework_debs' is undefined
make: *** [slave.mk:796: target/docker-sonic-mgmt-framework-dbg.gz] Error 1

Why I did it

To Fix SONiC build with INSTALL_DEBUG_TOOLS=y

How I did it

Fixed generate_manifest function to use version prefix in file names

How to verify it

Build SONiC with INSTALL_DEBUG_TOOLS=y

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

Fixed jinja2 error during SONiC build with INSTALL_DEBUG_TOOLS=y

A picture of a cute animal (not mandatory but encouraged)

@msosyak
Copy link
Contributor Author

msosyak commented Jun 22, 2021

@stepanblyschak @renukamanavalan Please review

@msosyak
Copy link
Contributor Author

msosyak commented Jun 24, 2021

@xumia Could we merge this?

@xumia xumia merged commit d6d7cb7 into sonic-net:master Jun 24, 2021
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
Why I did it
To Fix SONiC build with INSTALL_DEBUG_TOOLS=y

How I did it
Fixed generate_manifest function to use version prefix in file names

How to verify it
Build SONiC with INSTALL_DEBUG_TOOLS=y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants