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

[Build System] DEBS_DEPENDS does not automatically install the relevant package in case of .whl dependent on a Debian package #20742

Open
gpunathilell opened this issue Nov 8, 2024 · 2 comments
Assignees
Labels
MSFT Triaged this issue has been triaged

Comments

@gpunathilell
Copy link
Contributor

Description

When a .whl file is dependent on a debian package the debian package is not automatically installed as part of the image generated for switch deployment
Example:
In rules/sonic-yang-models-py3.mk:
SONIC_YANG_MODELS_PY3 has deb dependency on LIBYANG
In files/build_templates/sonic_debian_extension.j2:
LIBYANG is explicitly installed (even though the dependency is specified)

Steps to reproduce the issue:

  1. Build a switch image (on any platform) with a *.whl dependency on a .deb file (which is otherwise not present in the image)
  2. The build should succeed, deploy the image on a switch
  3. Confirm The .deb file is not explicitly installed.

Describe the results you received:

Describe the results you expected:

By specifying the _DEBS_DEPENDS rule the debian should be automatically installed

@prgeor
Copy link
Contributor

prgeor commented Nov 20, 2024

@saiarcot895 can you check if this is a build issue or yang issue. @qiluo-msft FYI

@saiarcot895
Copy link
Contributor

Dependencies that are specified in the *.mk files are used for the purposes of building other packages and building docker containers; they are not used in the build script for the image generation. Specifically, they will not be used in files/build_templates/sonic_debian_extension.j2. This applies to both deb packages and whl packages. It might be possible to add logic to do this, but depending on implementation, there might be repeated installations of the same package.

Additionally, as far as I know, there's no way to specify a dependency on a system library (or a deb package) in a whl package (unless there's some sort of installation hook available that can be used for checking this). It may be possible to test to see if a Python module exists at the time of installation of a deb package, but this requires some manual coding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MSFT Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

3 participants