diff --git a/azure-pipelines/end-to-end-tests-dir/asset-caching.ps1 b/azure-pipelines/end-to-end-tests-dir/asset-caching.ps1 index dfdd86e127..a2a61375d8 100644 --- a/azure-pipelines/end-to-end-tests-dir/asset-caching.ps1 +++ b/azure-pipelines/end-to-end-tests-dir/asset-caching.ps1 @@ -55,7 +55,6 @@ $actual = Run-VcpkgAndCaptureOutput -TestArgs ($commonArgs + @("install", "vcpkg $actual = $actual -replace "`r`n", "`n" $expected = @( -"A suitable version of .* was not found \(required v[0-9\.]+\)." "Asset cache miss; downloading from .*" "Successfully stored .* to .*." ) -join "`n" diff --git a/include/vcpkg/base/message-data.inc.h b/include/vcpkg/base/message-data.inc.h index 0e40db1209..d15d0ae574 100644 --- a/include/vcpkg/base/message-data.inc.h +++ b/include/vcpkg/base/message-data.inc.h @@ -248,6 +248,10 @@ DECLARE_MESSAGE(ArtifactsSwitchX86, (), "", "Forces host detection to x86 when a DECLARE_MESSAGE(ArtifactsSwitchWindows, (), "", "Forces host detection to Windows when acquiring artifacts") DECLARE_MESSAGE(AssetCacheHit, (msg::path, msg::url), "", "Asset cache hit for {path}; downloaded from: {url}") DECLARE_MESSAGE(AssetCacheMiss, (msg::url), "", "Asset cache miss; downloading from {url}") +DECLARE_MESSAGE(AssetCacheMissBlockOrigin, + (msg::path), + "x-block-origin is a vcpkg term. Do not translate", + "Asset cache miss for {path} and downloads are blocked by x-block-origin.") DECLARE_MESSAGE(DownloadingUrl, (msg::url), "", "Downloading {url}") DECLARE_MESSAGE(AssetCacheProviderAcceptsNoArguments, (msg::value), diff --git a/locales/messages.json b/locales/messages.json index 3d50bda319..be4a9a9054 100644 --- a/locales/messages.json +++ b/locales/messages.json @@ -175,6 +175,8 @@ "_AssetCacheHit.comment": "An example of {path} is /foo/bar. An example of {url} is https://github.com/microsoft/vcpkg.", "AssetCacheMiss": "Asset cache miss; downloading from {url}", "_AssetCacheMiss.comment": "An example of {url} is https://github.com/microsoft/vcpkg.", + "AssetCacheMissBlockOrigin": "Asset cache miss for {path} and downloads are blocked by x-block-origin.", + "_AssetCacheMissBlockOrigin.comment": "x-block-origin is a vcpkg term. Do not translate An example of {path} is /foo/bar.", "AssetCacheProviderAcceptsNoArguments": "unexpected arguments: '{value}' does not accept arguments", "_AssetCacheProviderAcceptsNoArguments.comment": "{value} is a asset caching provider name such as azurl, clear, or x-block-origin", "AssetCacheSuccesfullyStored": "Successfully stored {path} to {url}.", diff --git a/src/vcpkg/base/downloads.cpp b/src/vcpkg/base/downloads.cpp index 8955d5d24b..aa8f94b119 100644 --- a/src/vcpkg/base/downloads.cpp +++ b/src/vcpkg/base/downloads.cpp @@ -936,6 +936,11 @@ namespace vcpkg msg::url = replace_secrets(read_url, m_config.m_secrets)); return read_url; } + else + { + msg::println(msgAssetCacheMissBlockOrigin, + msg::path = download_path.filename()); + } } else if (auto script = m_config.m_script.get()) {