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

[vcpkg_from_sourceforge] Determine sourceforge status #13176

Merged

Conversation

JackBoosY
Copy link
Contributor

@JackBoosY JackBoosY commented Aug 27, 2020

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.

@JackBoosY JackBoosY added info:internal This PR or Issue was filed by the vcpkg team. category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly labels Aug 27, 2020
@JackBoosY JackBoosY marked this pull request as ready for review August 27, 2020 09:29
Comment on lines -62 to -64
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()
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Member

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.

Comment on lines -62 to -64
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()
Copy link
Member

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?

@BillyONeal BillyONeal merged commit 6800300 into microsoft:master Aug 28, 2020
@JackBoosY JackBoosY deleted the dev/jack/improve_vcpkg_from_sourceforge branch August 28, 2020 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly 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.

None yet

3 participants