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

Make "vcpkg install --only-downloads" compatible with asset caching #43157

Open
mokh-in opened this issue Jan 7, 2025 · 2 comments
Open

Make "vcpkg install --only-downloads" compatible with asset caching #43157

mokh-in opened this issue Jan 7, 2025 · 2 comments
Assignees
Labels
requires:repro The issue is not currently repro-able

Comments

@mokh-in
Copy link

mokh-in commented Jan 7, 2025

Is your feature request related to a problem? Please describe.

In certain scenarios, fetching assets (of already built binaries) is needed. The assets are cached and supposed to be fetched with an external tool (using x-script).

When running vcpkg install --only-downloads passing --x-asset-sources=clear;x-script,C:\python\python.exe C:\script\vcpkg-asset-provider.py {url} {sha512} {dst};x-block-origin, the execution fails with the following error:

error : Missing <asset_name> and downloads are blocked by x-block-origin

This indicates that --only-downloads doesn't respect asset caching.

Proposed solution

Make vcpkg install --only-downloads plays nicely with asset caching.

Describe alternatives you've considered

An alternative is to remove x-block-origin. However, this would mean that vcpkg.exe bypasses the asset cache and go to the internet to fetch the assets.

Additional context

No response

@mokh-in mokh-in added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Jan 7, 2025
@LilyWangLL LilyWangLL added requires:repro The issue is not currently repro-able and removed category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist labels Jan 8, 2025
@LilyWangLL
Copy link
Contributor

error : Missing <asset_name> and downloads are blocked by x-block-origin

If you complete the parameters <template> in the command, will it still report the same error?

@mokh-in
Copy link
Author

mokh-in commented Jan 8, 2025

It will. The value of <template> parameter is something like:
C:\python\python.exe C:\script\vcpkg-asset-provider.py {url} {sha512} {dst}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

2 participants