Skip to content

[rules/sonic-utilities.mk]: Add libyang as build time dependencies fo…#4850

Merged
lguohan merged 1 commit intosonic-net:masterfrom
praveen-li:add_libyang_dep_sonic_util
Jun 25, 2020
Merged

[rules/sonic-utilities.mk]: Add libyang as build time dependencies fo…#4850
lguohan merged 1 commit intosonic-net:masterfrom
praveen-li:add_libyang_dep_sonic_util

Conversation

@praveen-li
Copy link
Copy Markdown
Member

…r sonic-utilities.

sonic-utils has sonic-yang-mgmt as build time deps, which inturn installs libyang.
libyang is needed to run newly added test.
If sonic-yang-mgmt is already built then libyang will not be installed in slave docker
without this PR and test will not run.

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com

- Why I did it
Add libyang as build time dependencies for sonic-utils.

Why needed:
sonic-utils has sonic-yang-mgmt as build time deps, which inturn installs libyang.
libyang is needed to run newly added test.
If sonic-yang-mgmt is already built then libyang will not be installed in slave docker
without this PR and test will not run.

Below error will be seen.

==================================== ERRORS ====================================
 ERROR collecting deb_dist/sonic-utilities-1.2/sonic-utilities-tests/config_mgmt_test.py
ImportError while importing test module '/sonic/src/sonic-utilities/deb_dist/sonic-utilities-1.2/sonic-utilities-tests/config_mgmt_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python2.7/dist-packages/six.py:709: in exec_
    exec("""exec _code_ in _globs_, _locs_""")
sonic-utilities-tests/config_mgmt_test.py:5: in <module>
    os.path.join(os.path.dirname(__file__), '..', 'config', 'config_mgmt.py'))
config/config_mgmt.py:25: in <module>
    raise ImportError("%s - required module not found" % str(e))
E   ImportError: No module named yang - required module not found
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 1.55 seconds ============================

- How I did it
Add libyang as build time dependencies for sonic-utils.

- How to verify it
Built the PKG with pre-built sonic-yang-mgmt PKGs.

- Description for the changelog

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

…r sonic-utilities.

sonic-utils has sonic-yang-mgmt as build time deps, which inturn installs libyang.
libyang is needed to run newly added test.
If sonic-yang-mgmt is already built then libyang will not be installed in slave docker
without this PR and test will not run.

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
Copy link
Copy Markdown
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@praveen-li , please book an issue to fix the build cache issue.

@lguohan
Copy link
Copy Markdown
Collaborator

lguohan commented Jun 25, 2020

according to the log here, https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-image-pr/4498/artifact/target/python-debs/python-sonic-utilities_1.2-1_all.deb.log

it newly added deb_depends are not added to cache dependency.

@lguohan lguohan merged commit ddf8c8b into sonic-net:master Jun 25, 2020
pjaipakdee19 pushed a commit to pjaipakdee19/sonic-buildimage that referenced this pull request Jul 7, 2020
…r sonic-utilities. (sonic-net#4850)

sonic-utils has sonic-yang-mgmt as build time deps, which inturn installs libyang.
libyang is needed to run newly added test.
If sonic-yang-mgmt is already built then libyang will not be installed in slave docker
without this PR and test will not run.

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
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.

2 participants