-
Notifications
You must be signed in to change notification settings - Fork 180
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
75180f2
08df703
edba78f
d5eca26
a4fd67c
06a685d
6520c65
9a02ce2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,9 +30,25 @@ def can_install(self) -> bool: | |
def _install(self) -> bool: | ||
posix_os: Posix = cast(Posix, self.node.os) | ||
# use pip to make sure we install a recent version | ||
if (not posix_os.package_exists("meson")) or posix_os.get_package_information( | ||
"meson", use_cached=False | ||
) < "0.52.0": | ||
|
||
package_installed = "" | ||
package_available = "" | ||
for pkg in ["meson", "python3-meson"]: | ||
if ( | ||
posix_os.package_exists(pkg) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move the implementation into check_exists, so other place can reuse it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Version checking? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean the package existing check, it should be done in |
||
and posix_os.get_package_information(pkg, use_cached=False) >= "0.52.0" | ||
): | ||
package_installed = pkg | ||
squirrelsc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
break | ||
elif posix_os.is_package_in_repo(pkg): | ||
package_available = pkg | ||
break | ||
|
||
if package_installed: | ||
return self._check_exists() | ||
if package_available: | ||
posix_os.install_packages(package_available) | ||
else: | ||
username = self.node.tools[Whoami].get_username() | ||
self.node.tools[Pip].install_packages("meson", install_to_user=True) | ||
# environment variables won't expand even when using shell=True :\ | ||
|
@@ -48,6 +64,7 @@ def _install(self) -> bool: | |
no_info_log=True, | ||
no_error_log=True, | ||
) | ||
|
||
return self._check_exists() | ||
|
||
def setup(self, args: str, cwd: PurePath, build_dir: str = "build") -> PurePath: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assert the result to get it simpler.