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

Completing md5sum comparison and download #915

Merged
merged 2 commits into from
Nov 26, 2016
Merged

Completing md5sum comparison and download #915

merged 2 commits into from
Nov 26, 2016

Conversation

thopiekar
Copy link
Contributor

@thopiekar thopiekar commented Oct 23, 2016

This is the error message which appears without the change:

[INFO]:    # Downloading recipes
[INFO]:    Downloading qt5
[DEBUG]:   -> running mkdir -p /home/thopiekar/.local/share/python-for-android/packages/qt5
[INFO]:    -> directory context /home/thopiekar/.local/share/python-for-android/packages/qt5
[DEBUG]:   -> running basename http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz
[DEBUG]:        qt-everywhere-opensource-src-5.7.0.tar.gz
[WARNING]: Should check headers here! Skipping for now.
Downloading qt5 from http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz
[DEBUG]:   -> running rm -f .mark-qt-everywhere-opensource-src-5.7.0.tar.gz
[INFO]:    Downloading qt5 from http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz
[DEBUG]:   -> running touch .mark-qt-everywhere-opensource-src-5.7.0.tar.gz
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/media/hdd/home/thopiekar/Projekte/GIT/thopiekar/python-for-android_fork/pythonforandroid/toolchain.py", line 837, in <module>
    main()
  File "/media/hdd/home/thopiekar/Projekte/GIT/thopiekar/python-for-android_fork/pythonforandroid/toolchain.py", line 834, in main
    ToolchainCL()
  File "/media/hdd/home/thopiekar/Projekte/GIT/thopiekar/python-for-android_fork/pythonforandroid/toolchain.py", line 489, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/media/hdd/home/thopiekar/Projekte/GIT/thopiekar/python-for-android_fork/pythonforandroid/toolchain.py", line 147, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/media/hdd/home/thopiekar/Projekte/GIT/thopiekar/python-for-android_fork/pythonforandroid/toolchain.py", line 190, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 540, in build_recipes
  File "pythonforandroid/recipe.py", line 342, in download_if_necessary
  File "pythonforandroid/recipe.py", line 385, in download
UnboundLocalError: local variable 'current_md5' referenced before assignment

This is the error message which appears without the change:

'''
[INFO]:    # Downloading recipes
[INFO]:    Downloading qt5
[DEBUG]:   -> running mkdir -p /home/thopiekar/.local/share/python-for-android/packages/qt5
[INFO]:    -> directory context /home/thopiekar/.local/share/python-for-android/packages/qt5
[DEBUG]:   -> running basename http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz
[DEBUG]:        qt-everywhere-opensource-src-5.7.0.tar.gz
[WARNING]: Should check headers here! Skipping for now.
Downloading qt5 from http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz
[DEBUG]:   -> running rm -f .mark-qt-everywhere-opensource-src-5.7.0.tar.gz
[INFO]:    Downloading qt5 from http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz
[DEBUG]:   -> running touch .mark-qt-everywhere-opensource-src-5.7.0.tar.gz
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/media/hdd/home/thopiekar/Projekte/GIT/thopiekar/python-for-android_fork/pythonforandroid/toolchain.py", line 837, in <module>
    main()
  File "/media/hdd/home/thopiekar/Projekte/GIT/thopiekar/python-for-android_fork/pythonforandroid/toolchain.py", line 834, in main
    ToolchainCL()
  File "/media/hdd/home/thopiekar/Projekte/GIT/thopiekar/python-for-android_fork/pythonforandroid/toolchain.py", line 489, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/media/hdd/home/thopiekar/Projekte/GIT/thopiekar/python-for-android_fork/pythonforandroid/toolchain.py", line 147, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/media/hdd/home/thopiekar/Projekte/GIT/thopiekar/python-for-android_fork/pythonforandroid/toolchain.py", line 190, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 540, in build_recipes
  File "pythonforandroid/recipe.py", line 342, in download_if_necessary
  File "pythonforandroid/recipe.py", line 385, in download
UnboundLocalError: local variable 'current_md5' referenced before assignment
'''
@thopiekar
Copy link
Contributor Author

Oh, wait I'll finish the md5 comparison..

@thopiekar thopiekar changed the title Fixing referenced before assignment Completing md5sum comparison and download Oct 23, 2016
If the md5sum doesn't fit, the code will retry to compare the md5sum.
If it still doesn't fit the code will exit(1) at the end.
@thopiekar
Copy link
Contributor Author

Couldn't test against all cases, but should work now in most cases.

@thopiekar
Copy link
Contributor Author

Any questions/feedback left?

@inclement inclement merged commit 7c3d5e1 into kivy:master Nov 26, 2016
@inclement
Copy link
Member

Sorry for the delay reviewing, looks and works great.

@thopiekar
Copy link
Contributor Author

No problem 😉

Thank you for merging!

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.

2 participants