-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[vcpkg_from_sourceforge] Determine sourceforge status #13176
[vcpkg_from_sourceforge] Determine sourceforge status #13176
Conversation
if(vcpkg_download_distfile_SKIP_SHA512 AND NOT VCPKG_USE_HEAD_VERSION) | ||
message(FATAL_ERROR "vcpkg_download_distfile only allows SKIP_SHA512 when building with --head") | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you remove this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vcpkg_download_distfile(ARCHIVE
URLS "${DOWNLOAD_URL}"
SHA512 "${_vdus_SHA512}"
SKIP_SHA512
FILENAME "${_vdus_FILENAME}"
SILENT_EXIT
)
Here, since the file returned from sourceforge may be a web page in this case, it causes the inconsistency of SHA512, so we must skip the hash detection. This behavior was affected here, so it was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me. @ras0219 @strega-nil @dan-shaw @vicroms Do you agree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to merge this since it's causing other PR validations to fail e.g. #11290 if folks don't want this change please let me know afterwards.
if(vcpkg_download_distfile_SKIP_SHA512 AND NOT VCPKG_USE_HEAD_VERSION) | ||
message(FATAL_ERROR "vcpkg_download_distfile only allows SKIP_SHA512 when building with --head") | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me. @ras0219 @strega-nil @dan-shaw @vicroms Do you agree?
When there are some problems inside the sourceforge website, the downloaded file will become a web page with the content
We're sorry -- the Sourceforge site is currently in Disaster Recovery mode. Please check back later.
.Add code to deal with this situation.
Note: this PR cannot completely solve this problem, but it can handle incorrect HASH value judgments caused by changes in download content.