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

Delete handling for --x-use-aria2, avoid duplicate file hashing, and fix hash mismatch message. #43418

Merged
merged 14 commits into from
Jan 31, 2025

Conversation

BillyONeal
Copy link
Member

@BillyONeal BillyONeal commented Jan 23, 2025

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-A

Example new output:

CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:93 (message):
    D:/vcpkg-downloads/madler-zlib-v1-8c964249.3.1.tar.gz: error: existing downloaded file had an unexpected hash
    Expected: 8c9642495bafd6fad4ab9fb67f09b268c69ff9af0f4f20cf15dfc18852ff1f312bd8ca41de761b3f8d8e90e77d79f2ccacd3d4c5b19e475ecf09d021fdfe9087
    Actual  : 8c9642495bafd6fad4ab9fb67f09b268c69ff9af0f4f20cf15dfc18852ff1f312bd8ca41de761b3f8d8e90e77d79f2ccacd3d4c5b19e475ecf09d021fdfe9088
    note: You may be able to resolve this failure by redownloading the file. To do so, delete D:/vcpkg-downloads/madler-zlib-v1-8c964249.3.1.tar.gz and retry.
Call Stack (most recent call first):

... 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 :( )

Downloading https://github.com/madler/zlib/archive/v1.3.1.tar.gz -> madler-zlib-v1-8c964249.3.1.tar.gz
D:\vcpkg-downloads\madler-zlib-v1-8c964249.3.1.tar.gz.28932.part: error: download from https://github.com/madler/zlib/archive/v1.3.1.tar.gz had an unexpected hash
note: Expected: 8c9642495bafd6fad4ab9fb67f09b268c69ff9af0f4f20cf15dfc18852ff1f312bd8ca41de761b3f8d8e90e77d79f2ccacd3d4c5b19e475ecf09d021fdfe9087
note: Actual  : 8c9642495bafd6fad4ab9fb67f09b268c69ff9af0f4f20cf15dfc18852ff1f312bd8ca41de761b3f8d8e90e77d79f2ccacd3d4c5b19e475ecf09d021fdfe9088

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.

@BillyONeal BillyONeal added category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:internal This PR or Issue was filed by the vcpkg team. category:code-cleanup This PR cleans up code, without fixing any existing bugs nor adding any features. labels Jan 23, 2025
@BillyONeal
Copy link
Member Author

REGRESSION: angle:arm64-osx failed with BUILD_FAILED. If expected, add angle:arm64-osx=fail to /Users/vcpkg/Data/work/2/s/scripts/azure-pipelines/../ci.baseline.txt.
REGRESSION: angle:x64-osx failed with BUILD_FAILED. If expected, add angle:x64-osx=fail to /Users/vcpkg/Data/work/1/s/scripts/azure-pipelines/../ci.baseline.txt.

CMake Error at cmake/WebKitCommon-minimal.cmake:171 (include):
  include could not find requested file:

    WebKitMacros
Call Stack (most recent call first):
  CMakeLists.txt:5 (include)


CMake Error at cmake/WebKitCommon-minimal.cmake:174 (include):
  include could not find requested file:

    WebKitCompilerFlags
Call Stack (most recent call first):
  CMakeLists.txt:5 (include)


-- Found ZLIB: optimized;/Users/vcpkg/Data/installed/x64-osx/lib/libz.a;debug;/Users/vcpkg/Data/installed/x64-osx/debug/lib/libz.a (found version "1.3.1")
CMake Error at CMakeLists.txt:245 (WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS):
  Unknown CMake command "WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS".

This looks like a missing dependency declaration?

REGRESSION: mesa:x64-windows-static-md failed with BUILD_FAILED. If expected, add mesa:x64-windows-static-md=fail to D:\a_work\1\s\scripts\azure-pipelines/../ci.baseline.txt.

This looks like the %temp% race again, bison crashed.

REGRESSION: paraview:arm64-osx failed with BUILD_FAILED. If expected, add paraview:arm64-osx=fail to /Users/vcpkg/Data/work/2/s/scripts/azure-pipelines/../ci.baseline.txt.
REGRESSION: paraview:x64-osx failed with BUILD_FAILED. If expected, add paraview:x64-osx=fail to /Users/vcpkg/Data/work/1/s/scripts/azure-pipelines/../ci.baseline.txt.

Trying to download paraview_external_vtk_pr-c7760599.diff using asset cache https://vcpkgassetcachewus.blob.core.windows.net/cache/c7760599239334817e9cad33ab7019c2dd0ce6740891e10ec15e1d63605ad73095fd7d48aed5ca8d002d25db356a7a5cf2a37188f0b43a7a9fa4c339e8f42adb?*** SECRET ***
Download successful! Asset cache hit, did not try authoritative source https://gitlab.kitware.com/paraview/paraview/-/merge_requests/6375.diff?full_index=1
CMake Error at scripts/cmake/vcpkg_replace_string.cmake:12 (file):
  file failed to open for reading (No such file or directory):

    /Users/vcpkg/Data/b/paraview/paraview_external_vtk_pr.diff
Call Stack (most recent call first):
  ports/paraview/portfile.cmake:32 (vcpkg_replace_string)
  scripts/ports.cmake:196 (include)

Hmmmm looks like I missed a MAKE_DIRECTORY.

REGRESSION: vcpkg-tool-python2:x64-windows-static failed with BUILD_FAILED. If expected, add vcpkg-tool-python2:x64-windows-static=fail to D:\a_work\1\s\scripts\azure-pipelines/../ci.baseline.txt.
REGRESSION: vcpkg-tool-python2:x64-windows-static-md failed with BUILD_FAILED. If expected, add vcpkg-tool-python2:x64-windows-static-md=fail to D:\a_work\1\s\scripts\azure-pipelines/../ci.baseline.txt.

CMake Error at ports/vcpkg-tool-python2/portfile.cmake:41 (file):
  file RENAME failed to rename

    D:/p/vcpkg-tool-python2_x64-windows-static-md/manual-tools/python-2.7.18.amd64/SourceDir/

  to

    D:/p/vcpkg-tool-python2_x64-windows-static-md/manual-tools/vcpkg-tool-python2/

  because: The system cannot find the path specified.

@BillyONeal BillyONeal enabled auto-merge (squash) January 30, 2025 19:11
@BillyONeal BillyONeal merged commit d504de0 into microsoft:master Jan 31, 2025
17 checks passed
@BillyONeal BillyONeal deleted the delete-aria2 branch February 3, 2025 15:59
autoantwort pushed a commit to autoantwort/vcpkg that referenced this pull request Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:code-cleanup This PR cleans up code, without fixing any existing bugs nor adding any features. category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants