build: only test for all Android SDK paths where it is needed

Now that androguard can be used, the android-sdk is no longer required for
most operations.
This commit is contained in:
Hans-Christoph Steiner 2018-06-22 23:26:15 +02:00
parent a7bd3e01df
commit 58ab98a741
2 changed files with 6 additions and 5 deletions

View File

@ -992,6 +992,12 @@ def main():
if options.reset_server and not options.server:
parser.error("option %s: Using --reset-server without --server makes no sense" % "reset-server")
if options.onserver or not options.server:
for d in ['build-tools', 'platform-tools', 'tools']:
if not os.path.isdir(os.path.join(config['sdk_path'], d)):
raise FDroidException(_("Android SDK '{path}' does not have '{dirname}' installed!")
.format(path=config['sdk_path'], dirname=d))
log_dir = 'logs'
if not os.path.isdir(log_dir):
logging.info("Creating log directory")

View File

@ -435,11 +435,6 @@ def test_sdk_exists(thisconfig):
logging.critical(_("Android SDK path '{path}' is not a directory!")
.format(path=thisconfig['sdk_path']))
return False
for d in ['build-tools', 'platform-tools', 'tools']:
if not os.path.isdir(os.path.join(thisconfig['sdk_path'], d)):
logging.critical(_("Android SDK '{path}' does not have '{dirname}' installed!")
.format(path=thisconfig['sdk_path'], dirname=d))
return False
return True