microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.44k stars 6.2k forks source link

[vcpkg-tool] fetch downloads 7-zip, ignores VCPKG_FORCE_SYSTEM_BINARIES #26844

Open demianmnave-pti opened 1 year ago

demianmnave-pti commented 1 year ago

Describe the bug vcpkg fetch 7zip downloads 7-zip even if the system version is sufficient, and even if 'VCPKG_FORCE_SYSTEM_BINARIES' is set.

Environment

To Reproduce Steps to reproduce the behavior:

  1. Bootstrap vcpkg .
  2. Execute ./vcpkg.exe fetch 7zip

    A suitable version of 7zip was not found (required v21.7.0). Downloading portable 7zip v21.7.0... Downloading 7zip... https://www.7-zip.org/a/7z2107-extra.7z -> \downloads\7z2107-extra.7z Extracting 7zip...

    \downloads\tools\7zip-21.07-windows\7za.exe

Expected behavior vcpkg fetch 7zip finds the installed version of 7-zip.

Failure logs

Additional context ToolCacheImpl (src/vcpkg/tools.cpp) has no way of finding tools defined in vcpkgTools.xml unless there is a corresponding implementation of ToolProvider.

yvvki commented 10 months ago

Is there any update or branch for this issue?

MaxRev-Dev commented 7 months ago

I have some DNS issues when downloading 7zip, which can be related to my provider restrictions. This host doesn't work for me and fails with ERR_NAME_NOT_RESOLVED. error: https://www.7-zip.org/a/7z2301-extra.7z: WinHttpSendRequest failed with exit code 12007

Nevertheless, I have the latest 7zip installed 23.1 in my build pipeline, but it still fails. How to override the 7zip URL or binary location? I tried to set VCPKG_FORCE_SYSTEM_BINARIES and it doesn't change anything

github-actions[bot] commented 1 month ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

demianmnave-pti commented 1 month ago

Any ideas on how to fix this?