sonic-mgmt-framework icon indicating copy to clipboard operation
sonic-mgmt-framework copied to clipboard

Don't install dependent packages in Makefile

Open jleveque opened this issue 4 years ago • 0 comments

Installing dependent packages in the Makefile (see here) can break a parallel SONiC image build, because it can cause parallel executions of dpkg, which can cause failures. The build system has a dedicated lock to ensure only one make process can run dpkg at a time (also not that these calls to apt-get install do not have the -y flag, so they require a human to press y on the keyboard, which would cause the SONiC image build to fail, anyway).

In the image, we simply need to make sure the dependencies are installed in the build container as well as the host OS before building and installing sonic-mgmt-framework.

I suggest removing these lines and adding instructions for installing these dependencies in the README.md file of this repo. If you would like, you could also change these lines to perform the same checks, but instead of installing the packages, it could error out with a message stating that the dependency is not found.

jleveque avatar Oct 24 '20 00:10 jleveque