From 64445520b0a0c456876a8623cac1eb0d95ae4584 Mon Sep 17 00:00:00 2001 From: Francesco Cervigni Date: Tue, 13 Nov 2018 02:33:11 +0000 Subject: [PATCH] update.py: Still aapt output parsing, setting regex to catch 'name=' without prefixes, needed for build-tools 28.0.3 build-tools 28.0.3 added a new field in the end 'compileSdkVersionCodename=', which also accidentally ends with the string 'name='. The purpose of this regex was to catch the 'packageName' field, which is in ht eaapt ouput the exact ' name=', therefore added whe non-caracter \W prefix match. sample aapt output (28.0.3): package: name='com.a.b.app' versionCode='1' versionName='1.0' compileSdkVersion='28' compileSdkVersionCodename='9' previously, regex was catching second occurence, so '9' See merge request !582 --- fdroidserver/update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 97a69b89..1a331c83 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -55,7 +55,7 @@ METADATA_VERSION = 21 # less than the valid range of versionCode, i.e. Java's Integer.MIN_VALUE UNSET_VERSION_CODE = -0x100000000 -APK_NAME_PAT = re.compile(".*name='([a-zA-Z0-9._]*)'.*") +APK_NAME_PAT = re.compile(".*\Wname='([a-zA-Z0-9._]*)'.*") APK_VERCODE_PAT = re.compile(".*versionCode='([0-9]*)'.*") APK_VERNAME_PAT = re.compile(".*versionName='([^']*)'.*") APK_LABEL_ICON_PAT = re.compile(r".*\s+label='(.*)'\s+icon='(.*?)'")