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

DPDK: install path fixes for meson and Ubuntu 24.04 #3598

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make package_exists version check simpler
  • Loading branch information
mcgov committed Feb 5, 2025
commit 6bc582ce40abdd476199616e49b92ea2a33f5d6a
23 changes: 9 additions & 14 deletions lisa/operating_system.py
Original file line number Diff line number Diff line change
@@ -415,22 +415,17 @@ def package_exists(
"""
package_name = self.__resolve_package_name(package)
exists = self._package_exists(package_name)
if exists and minimum_version is not None:
acceptable = bool(
self.get_package_information(package_name=package_name)
>= minimum_version
)
if not acceptable:
self._log.debug(
(
f"Minimum version of package {package_name} "
f"did not meet minimum of {str(minimum_version)}."
)
)
return acceptable
else:
self._log.debug(f"package '{package}' exists: {exists}")
if minimum_version is None or not exists:
return exists

actual_version = self.get_package_information(package_name=package_name)
self._log.debug(
f"package '{package}' expected min version: "
f"{str(minimum_version)}, actual version: {str(actual_version)}"
)
return actual_version >= minimum_version

def is_package_in_repo(self, package: Union[str, Tool, Type[Tool]]) -> bool:
"""
Query if a package/tool exists in the repo