mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
add more SDK checks: build-tools/19.0.3 and presense of aapt
Make sure that fdroid can find aapt in the current config, otherwise exit with an error. Some users don't have build_tools set, and their SDK does not include the build-tools in the default versioned dir, so this should warn them of what is wrong.
This commit is contained in:
parent
3690b89e0a
commit
6ca060e10d
3 changed files with 66 additions and 15 deletions
|
|
@ -144,6 +144,23 @@ def test_sdk_exists(c):
|
|||
return True
|
||||
|
||||
|
||||
def test_build_tools_exists(c):
|
||||
if not test_sdk_exists(c):
|
||||
return False
|
||||
build_tools = os.path.join(c['sdk_path'], 'build-tools')
|
||||
versioned_build_tools = os.path.join(build_tools, c['build_tools'])
|
||||
if not os.path.isdir(versioned_build_tools):
|
||||
logging.critical('Android Build Tools path "'
|
||||
+ versioned_build_tools + '" does not exist!')
|
||||
return False
|
||||
if not os.path.exists(os.path.join(c['sdk_path'], 'build-tools', c['build_tools'], 'aapt')):
|
||||
logging.critical('Android Build Tools "'
|
||||
+ versioned_build_tools
|
||||
+ '" does not contain "aapt"!')
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def write_password_file(pwtype, password=None):
|
||||
'''
|
||||
writes out passwords to a protected file instead of passing passwords as
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue