aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Bonnici <marc.bonnici@arm.com>2019-01-04 17:23:08 +0000
committersetrofim <setrofim@gmail.com>2019-02-08 13:56:55 +0000
commit0cba3c68dc9916da65484e07ee360ff2d3972780 (patch)
treeab408241a858cf6c95dd36cc841fa5cdaec25512
parentf267fc927748b07fbf8ad619013bb652fb6ff935 (diff)
fw/resource: Support matching APKs on multiple versions.
In the case where a range of apk versions are valid allow for the matching process to accommodate a list of versions instead of a single value.
-rw-r--r--wa/framework/resource.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/wa/framework/resource.py b/wa/framework/resource.py
index aa1e04c2..a4dd7076 100644
--- a/wa/framework/resource.py
+++ b/wa/framework/resource.py
@@ -273,10 +273,14 @@ class ResourceResolver(object):
def apk_version_matches(path, version):
+ version = list_or_string(version)
info = ApkInfo(path)
- if info.version_name == version or info.version_code == version:
- return True
- return loose_version_matching(version, info.version_name)
+ for v in version:
+ if info.version_name == v or info.version_code == v:
+ return True
+ if loose_version_matching(v, info.version_name):
+ return True
+ return False
def loose_version_matching(config_version, apk_version):