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: Fix source for tarball #3505

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

DPDK: Fix source for tarball #3505

wants to merge 5 commits into from

Conversation

mcgov
Copy link
Collaborator

@mcgov mcgov commented Nov 11, 2024

Fix the way the TarDownloader handles dowloading files and identifying their filenames. This required fixing a bug in the Tar tool where Linux would not infer the filename in the default case like the Windows version does. Previously, providing a directory and not a filename would result in the tool identifying an entire directory of files as the filename when the Wget tool fetches a cached result.

This PR fixes that issue by allowing the tool to infer the filename, this fixes the ability to use the Wget tool without force_run when using a default filename.

Fixing one bug uncovered a few others.
Fixes the way the Tar tool handles fetching
the filename of the tar file it downloads.
@mcgov
Copy link
Collaborator Author

mcgov commented Nov 12, 2024

Note: testing in progress.

lisa/base_tools/wget.py Outdated Show resolved Hide resolved
lisa/base_tools/wget.py Outdated Show resolved Hide resolved
lisa/tools/tar.py Outdated Show resolved Hide resolved
When running Wget.get(..., force_run=False) and Tar.extract it is
useful to allow Tar to skip extracting existing files on the second
pass.

Allow the skip-old-files option, so Tar.extract will not overwrite
existing files in the output directory.

Note: it's important to not use this option if you are providing LISA
with a default filename for your tarballs. This option could silently
allow Tar.extract to not update the contents of a directory with the
newer file contents.

I don't see anyone using that schema now. My apologies to future devs who
find this commit message while debugging that issue.

Tar: chi comments
@@ -24,6 +24,10 @@ class Wget(Tool):
def command(self) -> str:
return "wget"

def _initialize(self, *args: Any, **kwargs: Any) -> None:
self._url_file_cache: Dict[str, str] = dict()
return super()._initialize(*args, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't need return, because the function signature return value is None. It means nothing to return.

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

Successfully merging this pull request may close these issues.

2 participants