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

fixed redirection for download liblzma #2452

Merged
merged 2 commits into from
Jun 14, 2021
Merged

Conversation

td1803
Copy link
Contributor

@td1803 td1803 commented May 4, 2021

liblzma was no longer loaded correctly. redirection not considered.

Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR 🙏
But maybe then this would impact another package that doesn't handle it with Chrome.
I'm thinking maybe we should take another approach.
Either make this easily overridable per recipe, or hacking it around in liblzma recipe only.
Also what was the exact error you got with liblzma at Python level, was it a OSError or something else?
How about when we do it with curl what is returned (just for debugging purpose)

@@ -213,7 +213,9 @@ def report_hook(index, blksize, size):
while True:
try:
# jqueryui.com returns a 403 w/ the default user agent
url_opener.addheaders = [('User-agent', 'Mozilla/5.0')]
# url_opener.addheaders = [('User-agent', 'Mozilla/5.0')]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we keep this line commented rather than completely removing it?

@td1803
Copy link
Contributor Author

td1803 commented May 5, 2021 via email

@obfusk
Copy link
Contributor

obfusk commented May 5, 2021

Setting the user agent to Wget/1.0 seems to work for both jqueryui (the reason we override the default to begin with) and liblzma. It's not guaranteed to work for everything either but probably the easiest short-term fix.

Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah let's give it a try.
Thanks @tshirtman for the review

@AndreMiras AndreMiras merged commit f004273 into kivy:develop Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants