-
Notifications
You must be signed in to change notification settings - Fork 437
Enable filtering of tarball extraction #15717
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
Enable filtering of tarball extraction #15717
Conversation
|
Investigating why 2 legs are failing - worked fine locally. |
We could likely modify the targets file to enable selective extraction for mainline Linux and Windows. |
|
|
|
@NikolaMilosavljevic I think we should fix this across all the platforms. .NET now has Tar support (.NET 7+). Could we use that instead of the local command line tools? https://learn.microsoft.com/en-us/dotnet/api/system.formats.tar.tarreader?view=net-7.0 |
95b8237 to
3b2ceb2
Compare
I've updated the PR. |
| { | ||
| #if NETFRAMEWORK | ||
| // Run the base tool, which uses external 'tar' command | ||
| retVal = base.Execute(); |
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.
Do you happen to know whether this codepath is executed any longer? If it's not, we could just add an NYI exception.
My hunch is it's not.
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.
I'm not 100% sure about NETFRAMEWORK code-path, but we also use base implementation (and tar command) for full package extraction, which is still needed.
mmitche
left a comment
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.
Looks good to me. Small question about whether the tool-based tar implementation is required.
Fixes: #15698
This change extends the original work (#15272) to Linux archives.
We need to selectively extract content from archives provided by
aspnetcoreandwindowsdesktop. Without this fix, we end up with multiple NETCore.App runtimes in SDK tarball. Besides incorrect SDK tarball content, this causes failures in source-build's SDK diff tests: dotnet/source-build#3298Partial tarball extraction uses GZipStream and TarReader whcih are supported in .NET 7.0+
External tar command is still used for NETFramework and full extraction code-paths.