find cmds from SDK build-tools in a more flexible way, on the fly

This is a more flexible approach than testing for the complete SDK and
build-tools up front.  This will only test for the commands that are
actually being run, so that if you only have `aapt` installed, you can do
`fdroid update` without errors, but other commands will still give
appropriate errors.

This also makes the build_tools item in config.py optional, it is only
needed if you want to force a specific version of the build-tools.
This commit is contained in:
Hans-Christoph Steiner 2014-12-09 14:12:41 +01:00
parent 298a88a498
commit 9244256461
6 changed files with 132 additions and 46 deletions

View file

@ -39,7 +39,7 @@ import logging
import common
import metadata
from common import FDroidPopen, SilentPopen
from common import FDroidPopen, SdkToolsPopen
from metadata import MetaDataException
@ -436,7 +436,7 @@ def scan_apks(apps, apkcache, repodir, knownapks):
thisinfo['features'] = set()
thisinfo['icons_src'] = {}
thisinfo['icons'] = {}
p = SilentPopen([config['aapt'], 'dump', 'badging', apkfile])
p = SdkToolsPopen(['aapt', 'dump', 'badging', apkfile])
if p.returncode != 0:
if options.delete_unknown:
if os.path.exists(apkfile):