Delete handling for --x-use-aria2, avoid duplicate file hashing, and fix hash mismatch message. #43418
+60
−193
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related microsoft/vcpkg-tool#1582
In microsoft/vcpkg-tool#1580 (comment) I discovered that the existing hash mismatch message was entirely broken.
Also fixed that whenever we had an existing download with a matching SHA, we were SHA512-ing it twice.
It seems like the existing
_VCPKG_INTERNAL_NO_HASH_CHECK
is broken as the only place it is used is for updating qt, and for those cases not trying to download a current version seems like an error, but I've kept the existing behavior. /cc @Neumann-AExample new output:
... now matches the current tool output in the download case except for the 'note's. (I would put the note:s there, but CMake already makes emitting reasonable errors here impossible by forcing things to be indented :( )
As an aside, I think there's an argument that the 'existing file' handling belongs in
x-download
, rather than here in CMake, but as that affects a documented interface I'm not looking to make such a change right now.