aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-11-07 17:10:51 -0800
committerRobert Schumacher <roschuma@microsoft.com>2018-11-07 17:10:51 -0800
commit273b8ce3d0d3533f3b959a7ecf4b0aa1eef22cab (patch)
tree6e6d222d0a1e6a549aea8258ce35f7ef4da9f381
parent4aba36cd381f42bead4b74bc49362359873f9760 (diff)
downloadvcpkg-273b8ce3d0d3533f3b959a7ecf4b0aa1eef22cab.tar.gz
vcpkg-273b8ce3d0d3533f3b959a7ecf4b0aa1eef22cab.zip
[vcpkg-fetch] Switch back to 18.1.0; add hack in vcpkg.exe to map the hashes together.
-rw-r--r--scripts/vcpkgTools.xml16
-rw-r--r--toolsrc/src/vcpkg/base/downloads.cpp12
-rw-r--r--toolsrc/vcpkg.sln1
3 files changed, 20 insertions, 9 deletions
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml
index 3f0f72c58..747963c07 100644
--- a/scripts/vcpkgTools.xml
+++ b/scripts/vcpkgTools.xml
@@ -60,11 +60,11 @@
<archiveName>QtInstallerFramework-win-x86.zip</archiveName>
</tool>
<tool name="7zip" os="windows">
- <version>16.4.0</version>
- <exeRelativePath>7-Zip.CommandLine.16.4.0\tools\7za.exe</exeRelativePath>
- <url>https://www.nuget.org/api/v2/package/7-Zip.CommandLine/16.4.0</url>
- <sha512>2142734a2ad8d8988b080a9f1814991ee7eeaf8e14b2473d2ad3a006ffe7b2a80e9b812b6695c095730090d4016ac2866be7599156669deaf13bea12d62bf068</sha512>
- <archiveName>7-zip.commandline.16.4.0.nupkg</archiveName>
+ <version>18.1.0</version>
+ <exeRelativePath>7-Zip.CommandLine.18.1.0\tools\7za.exe</exeRelativePath>
+ <url>https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0</url>
+ <sha512>8c75314102e68d2b2347d592f8e3eb05812e1ebb525decbac472231633753f1d4ca31c8e6881a36144a8da26b2571305b3ae3f4e2b85fc4a290aeda63d1a13b8</sha512>
+ <archiveName>7-zip.commandline.18.1.0.nupkg</archiveName>
</tool>
<tool name="aria2" os="windows">
<version>18.01.0</version>
@@ -78,20 +78,20 @@
<exeRelativePath>ninja.exe</exeRelativePath>
<url>https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip</url>
<sha512>9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5</sha512>
- <archiveName>ninja-win.zip</archiveName>
+ <archiveName>ninja-win-1.8.2.zip</archiveName>
</tool>
<tool name="ninja" os="linux">
<version>1.8.2</version>
<exeRelativePath>ninja</exeRelativePath>
<url>https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip</url>
<sha512>38fcb68e745c1f15b4b50f20069ffe686b1ef5baf93b74958e132ea5d30d155cf6970d6dc1b095aafd421ebd8bcc63acf4f64e305c496266b5182f99b815cca5</sha512>
- <archiveName>ninja-linux.zip</archiveName>
+ <archiveName>ninja-linux-1.8.2.zip</archiveName>
</tool>
<tool name="ninja" os="osx">
<version>1.8.2</version>
<exeRelativePath>ninja</exeRelativePath>
<url>https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip</url>
<sha512>acadfb286eb7d93676629701917fa0c3c39f36daa068c169e4a098c29f97380d1ea95abfd42b04798ff118fd9dc93fdb250fcda36086bac20bc5506354214fc3</sha512>
- <archiveName>ninja-mac.zip</archiveName>
+ <archiveName>ninja-mac-1.8.2.zip</archiveName>
</tool>
</tools>
diff --git a/toolsrc/src/vcpkg/base/downloads.cpp b/toolsrc/src/vcpkg/base/downloads.cpp
index 1d7b3527d..fad3ff119 100644
--- a/toolsrc/src/vcpkg/base/downloads.cpp
+++ b/toolsrc/src/vcpkg/base/downloads.cpp
@@ -102,7 +102,17 @@ namespace vcpkg::Downloads
const fs::path& path,
const std::string& sha512)
{
- const std::string actual_hash = vcpkg::Hash::get_file_hash(fs, path, "SHA512");
+ std::string actual_hash = vcpkg::Hash::get_file_hash(fs, path, "SHA512");
+
+ // <HACK to handle NuGet.org changing nupkg hashes.>
+ // This is the NEW hash for 7zip
+ if (actual_hash == "a9dfaaafd15d98a2ac83682867ec5766720acf6e99d40d1a00d480692752603bf3f3742623f0ea85647a92374df"
+ "405f331afd6021c5cf36af43ee8db198129c0")
+ // This is the OLD hash for 7zip
+ actual_hash = "8c75314102e68d2b2347d592f8e3eb05812e1ebb525decbac472231633753f1d4ca31c8e6881a36144a8da26b257"
+ "1305b3ae3f4e2b85fc4a290aeda63d1a13b8";
+ // </HACK>
+
Checks::check_exit(VCPKG_LINE_INFO,
sha512 == actual_hash,
"File does not have the expected hash:\n"
diff --git a/toolsrc/vcpkg.sln b/toolsrc/vcpkg.sln
index 6b92c973b..8d0c849c6 100644
--- a/toolsrc/vcpkg.sln
+++ b/toolsrc/vcpkg.sln
@@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F589
..\scripts\get_triplet_environment.cmake = ..\scripts\get_triplet_environment.cmake
..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1
..\scripts\ports.cmake = ..\scripts\ports.cmake
+ ..\scripts\vcpkgTools.xml = ..\scripts\vcpkgTools.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cmake", "cmake", "{A0122231-04D5-420B-81CA-7960946E5E65}"