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

ndctl: Check for build-deps via pkg-config instead of software-manager #2001

Open
vaibhav92 opened this issue Jan 28, 2021 · 2 comments
Open

Comments

@vaibhav92
Copy link

The code

if not self.smm.check_installed(pkg) and not \
checks for presence of certain named rpm's on the system before building ndctl. This approach has following disadvantages:

  • RPM names are not distro neutral as different distros choose different names for these build-dependencies.
  • This doesnt work if the build-deps have been manually built and installed on the system.

A better approach however can be to use pkg-confg(1) which maintains a registry of all the available libraries. For example simple test for existence of json-c devel would be to check if the following command returns a zero status:
$ pkg-config --exists json-c

This would work both in case the build-deps were installed from the package-manager or manually by building locally.

@harish-24
Copy link
Member

@vaibhav92 This is a good idea, we can take it forward with the avocado community by adding the needed APIs to the avocado framework so that the tests may choose to use it on need basis.

@PraveenPenguin
Copy link
Member

worth looking @abdhaleegit @Naresh-ibm @narasimhan-v what is your take?

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

No branches or pull requests

3 participants