Skip to content

Binary caching fail is not a build fail #32522

@shhwang-thordrive

Description

@shhwang-thordrive

Describe the bug
Following command will fail if the HTTP server is not running:

$ vcpkg install --binarysource="http,http://localhost:15151/{name}/{version}/{sha},readwrite" zlib
...
error: curl failed to execute with exit code 7.

I think cache unavailable is a cache miss not a build fail.
We have to respect existing flag --only-binarycaching that results command fail when the binary source is not available.

Environment

  • OS: Lniux
  • Compiler: GCC11

To Reproduce
Steps to reproduce the behavior:

  1. vcpkg install --binarysource="http,http://localhost:15151/{name}/{version}/{sha},readwrite" zlib
  2. error: curl failed to execute with exit code 7.

Expected behavior
zlib installed without an error.

Failure logs

$ vcpkg remove zlib && vcpkg install --binarysource="http,http://localhost:15151/{name}/{version}/{sha},readwrite" zlib                                                       
The following packages are not installed:
    zlib:x64-linux
Computing installation plan...
The following packages will be built and installed:
    zlib:x64-linux -> 1.2.13
Detecting compiler hash for triplet x64-linux...
Restored 0 package(s) from /home/hypnos/.cache/vcpkg/archives in 5.03 us. Use --debug to see more details.
error: curl failed to execute with exit code 7.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

category:vcpkg-featureThe issue is a new capability of the tool that doesn’t already exist and we haven’t committedrequires:tool-releaseAn issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions