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

Use 7zr to unpack 7zip #1477

Merged
merged 16 commits into from
Sep 17, 2024
Merged

Conversation

JavierMatosD
Copy link
Contributor

@JavierMatosD JavierMatosD commented Aug 12, 2024

Depends on microsoft/vcpkg#40416

I believe artifact tests will fail until 7zr is available..

@JavierMatosD JavierMatosD added the depends:different-pr This PR depends on a different PR which has been filed label Aug 12, 2024
src/vcpkg/archives.cpp Outdated Show resolved Hide resolved
@BillyONeal BillyONeal removed the depends:different-pr This PR depends on a different PR which has been filed label Sep 10, 2024
@JavierMatosD
Copy link
Contributor Author

JavierMatosD commented Sep 12, 2024

I attempted to use 7z/7zr for handling tar formats, but ran into issues because 7z requires unpacking compressed tar archives (like .tar.gz or .tgz) in two steps: first to decompress the gzip layer, and then to extract the tar archive. This would necessitate refactoring to manage intermediate files and decide when multiple unpacking steps are needed. For instance, both .tar.gz and .tgz require two steps, as they are effectively the same.

Additionally, it would require handling different combinations of compressed formats, such as .exe.gz. In such cases, the first step would be decompressing the .gz layer to access the underlying file (e.g., .exe). This logic applies to other combinations as well, where varying numbers of steps are needed depending on the file types. For example, .tar.gz requires two steps, while .exe.gz only needs one.

Since the main goal of this work is to remove the dependency on MSI, I decided to continue using tar.exe for decompressing tar files and leave the handling of these combinations for another PR.

@JavierMatosD JavierMatosD marked this pull request as ready for review September 12, 2024 21:08
Copy link
Member

@vicroms vicroms left a comment

Choose a reason for hiding this comment

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

Thanks @BillyONeal for the e2e tests fix

LGTM

@JavierMatosD JavierMatosD merged commit a47c79f into microsoft:main Sep 17, 2024
6 checks passed
BillyONeal added a commit to BillyONeal/vcpkg-tool that referenced this pull request Sep 18, 2024
Removes the hack added in microsoft#1477
Tests the condition fixed by microsoft#1473
BillyONeal added a commit that referenced this pull request Sep 19, 2024
Removes the hack added in #1477
Tests the condition fixed by #1473
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.

3 participants