From b5cd850abee421ebe65128fac2169ae09edb67d1 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 14 Oct 2020 16:43:24 +0200 Subject: [PATCH] apksigner search should use MINIMUM_APKSIGNER_BUILD_TOOLS_VERSION --- fdroidserver/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index ee093778..aefe50b0 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -423,7 +423,8 @@ def find_apksigner(): Returns the best version of apksigner following this algorithm: * use config['apksigner'] if set * try to find apksigner in path - * find apksigner in build-tools starting from newest installed going down to MINIMUM_APKSIGNER_BUILD_TOOLS_VERSION + * find apksigner in build-tools starting from newest installed + going down to MINIMUM_APKSIGNER_BUILD_TOOLS_VERSION :return: path to apksigner or None if no version is found """ if set_command_in_config('apksigner'): @@ -434,7 +435,7 @@ def find_apksigner(): for f in sorted(os.listdir(build_tools_path), reverse=True): if not os.path.isdir(os.path.join(build_tools_path, f)): continue - if LooseVersion(f) < LooseVersion(MINIMUM_AAPT_BUILD_TOOLS_VERSION): + if LooseVersion(f) < LooseVersion(MINIMUM_APKSIGNER_BUILD_TOOLS_VERSION): return None if os.path.exists(os.path.join(build_tools_path, f, 'apksigner')): apksigner = os.path.join(build_tools_path, f, 'apksigner')