From: Hans-Christoph Steiner Date: Thu, 23 Feb 2017 21:25:33 +0000 (+0100) Subject: normalize Build TYPE_STRING data based on .txt X-Git-Tag: 0.8~121^2~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=593613043e0770dd5c702d8b5a9f00cff132d11a;p=fdroidserver.git normalize Build TYPE_STRING data based on .txt Unfortunately, things like versionCode must be strings. That should be converted to be ints throughout. --- diff --git a/fdroidserver/metadata.py b/fdroidserver/metadata.py index 924d7d87..e10013d1 100644 --- a/fdroidserver/metadata.py +++ b/fdroidserver/metadata.py @@ -827,6 +827,8 @@ def post_metadata_parse(app): build[k] = ['yes'] else: build[k] = [] + elif flagtype(k) == TYPE_STRING and type(v) in (float, int): + build[k] = str(v) builds.append(build) if not app.get('Description'): diff --git a/tests/metadata/dump/org.videolan.vlc.yaml b/tests/metadata/dump/org.videolan.vlc.yaml index aa51aab8..4e0b5c9e 100644 --- a/tests/metadata/dump/org.videolan.vlc.yaml +++ b/tests/metadata/dump/org.videolan.vlc.yaml @@ -89,7 +89,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 110 + versionCode: '110' versionName: 0.0.11-ARMv7 - androidupdate: - . @@ -123,7 +123,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 111 + versionCode: '111' versionName: 0.0.11-ARM - androidupdate: - . @@ -157,7 +157,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 112 + versionCode: '112' versionName: 0.0.11-x86 - androidupdate: - . @@ -191,7 +191,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 113 + versionCode: '113' versionName: 0.0.11-mips - androidupdate: [] antcommands: [] @@ -224,7 +224,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1301 + versionCode: '1301' versionName: 0.1.3-MIPS - androidupdate: [] antcommands: [] @@ -257,7 +257,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1302 + versionCode: '1302' versionName: 0.1.3-x86 - androidupdate: [] antcommands: [] @@ -290,7 +290,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1303 + versionCode: '1303' versionName: 0.1.3-ARM - androidupdate: [] antcommands: [] @@ -323,7 +323,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1304 + versionCode: '1304' versionName: 0.1.3-ARMv7 - androidupdate: [] antcommands: [] @@ -355,7 +355,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9002 + versionCode: '9002' versionName: 0.9.0 - androidupdate: [] antcommands: [] @@ -387,7 +387,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9004 + versionCode: '9004' versionName: 0.9.0 - androidupdate: [] antcommands: [] @@ -419,7 +419,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9102 + versionCode: '9102' versionName: 0.9.1 - androidupdate: [] antcommands: [] @@ -451,7 +451,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9104 + versionCode: '9104' versionName: 0.9.1 - androidupdate: [] antcommands: [] @@ -483,7 +483,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9502 + versionCode: '9502' versionName: 0.9.5 - androidupdate: [] antcommands: [] @@ -515,7 +515,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9504 + versionCode: '9504' versionName: 0.9.5 - androidupdate: [] antcommands: [] @@ -547,7 +547,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9602 + versionCode: '9602' versionName: 0.9.6 - androidupdate: [] antcommands: [] @@ -579,7 +579,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9604 + versionCode: '9604' versionName: 0.9.6 - androidupdate: [] antcommands: [] @@ -611,7 +611,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9702 + versionCode: '9702' versionName: 0.9.7 - androidupdate: [] antcommands: [] @@ -643,7 +643,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9704 + versionCode: '9704' versionName: 0.9.7 - androidupdate: [] antcommands: [] @@ -675,7 +675,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9711 + versionCode: '9711' versionName: 0.9.7.1 - androidupdate: [] antcommands: [] @@ -707,7 +707,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9712 + versionCode: '9712' versionName: 0.9.7.1 - androidupdate: [] antcommands: [] @@ -739,7 +739,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9714 + versionCode: '9714' versionName: 0.9.7.1 - androidupdate: [] antcommands: [] @@ -771,7 +771,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9802 + versionCode: '9802' versionName: 0.9.8 - androidupdate: [] antcommands: [] @@ -803,7 +803,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9803 + versionCode: '9803' versionName: 0.9.8 - androidupdate: [] antcommands: [] @@ -835,7 +835,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9804 + versionCode: '9804' versionName: 0.9.8 - androidupdate: [] antcommands: [] @@ -867,7 +867,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9902 + versionCode: '9902' versionName: 0.9.9 - androidupdate: [] antcommands: [] @@ -899,7 +899,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9903 + versionCode: '9903' versionName: 0.9.9 - androidupdate: [] antcommands: [] @@ -931,7 +931,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 9904 + versionCode: '9904' versionName: 0.9.9 - androidupdate: [] antcommands: [] @@ -963,7 +963,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 10002 + versionCode: '10002' versionName: 0.9.10 - androidupdate: [] antcommands: [] @@ -995,7 +995,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 10003 + versionCode: '10003' versionName: 0.9.10 - androidupdate: [] antcommands: [] @@ -1027,7 +1027,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 10004 + versionCode: '10004' versionName: 0.9.10 - androidupdate: [] antcommands: [] @@ -1059,7 +1059,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 10006 + versionCode: '10006' versionName: 1.0.0 - androidupdate: [] antcommands: [] @@ -1091,7 +1091,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 10007 + versionCode: '10007' versionName: 1.0.0 - androidupdate: [] antcommands: [] @@ -1123,7 +1123,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 10008 + versionCode: '10008' versionName: 1.0.0 - androidupdate: [] antcommands: [] @@ -1155,7 +1155,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 10102 + versionCode: '10102' versionName: 1.0.1 - androidupdate: [] antcommands: [] @@ -1187,7 +1187,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 10103 + versionCode: '10103' versionName: 1.0.1 - androidupdate: [] antcommands: [] @@ -1219,7 +1219,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 10104 + versionCode: '10104' versionName: 1.0.1 - androidupdate: [] antcommands: [] @@ -1253,7 +1253,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1010303 + versionCode: '1010303' versionName: 1.1.3 - androidupdate: [] antcommands: [] @@ -1287,7 +1287,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1010304 + versionCode: '1010304' versionName: 1.1.3 - androidupdate: [] antcommands: [] @@ -1321,7 +1321,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1010305 + versionCode: '1010305' versionName: 1.1.3 - androidupdate: [] antcommands: [] @@ -1355,7 +1355,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1010503 + versionCode: '1010503' versionName: 1.1.5 - androidupdate: [] antcommands: [] @@ -1389,7 +1389,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1010504 + versionCode: '1010504' versionName: 1.1.5 - androidupdate: [] antcommands: [] @@ -1423,7 +1423,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1010505 + versionCode: '1010505' versionName: 1.1.5 - androidupdate: [] antcommands: [] @@ -1457,7 +1457,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1010603 + versionCode: '1010603' versionName: 1.1.6 - androidupdate: [] antcommands: [] @@ -1491,7 +1491,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1010604 + versionCode: '1010604' versionName: 1.1.6 - androidupdate: [] antcommands: [] @@ -1525,7 +1525,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1010605 + versionCode: '1010605' versionName: 1.1.6 - androidupdate: [] antcommands: [] @@ -1559,7 +1559,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020003 + versionCode: '1020003' versionName: 1.2.0 - androidupdate: [] antcommands: [] @@ -1593,7 +1593,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020004 + versionCode: '1020004' versionName: 1.2.0 - androidupdate: [] antcommands: [] @@ -1627,7 +1627,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020005 + versionCode: '1020005' versionName: 1.2.0 - androidupdate: [] antcommands: [] @@ -1661,7 +1661,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020103 + versionCode: '1020103' versionName: 1.2.1 - androidupdate: [] antcommands: [] @@ -1695,7 +1695,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020104 + versionCode: '1020104' versionName: 1.2.1 - androidupdate: [] antcommands: [] @@ -1729,7 +1729,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020105 + versionCode: '1020105' versionName: 1.2.1 - androidupdate: [] antcommands: [] @@ -1763,7 +1763,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020203 + versionCode: '1020203' versionName: 1.2.2 - androidupdate: [] antcommands: [] @@ -1797,7 +1797,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020204 + versionCode: '1020204' versionName: 1.2.2 - androidupdate: [] antcommands: [] @@ -1831,7 +1831,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020205 + versionCode: '1020205' versionName: 1.2.2 - androidupdate: [] antcommands: [] @@ -1865,7 +1865,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020303 + versionCode: '1020303' versionName: 1.2.3 - androidupdate: [] antcommands: [] @@ -1899,7 +1899,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020304 + versionCode: '1020304' versionName: 1.2.3 - androidupdate: [] antcommands: [] @@ -1933,7 +1933,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020305 + versionCode: '1020305' versionName: 1.2.3 - androidupdate: [] antcommands: [] @@ -1967,7 +1967,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020403 + versionCode: '1020403' versionName: 1.2.4 - androidupdate: [] antcommands: [] @@ -2001,7 +2001,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020404 + versionCode: '1020404' versionName: 1.2.4 - androidupdate: [] antcommands: [] @@ -2035,7 +2035,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020405 + versionCode: '1020405' versionName: 1.2.4 - androidupdate: [] antcommands: [] @@ -2069,7 +2069,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020503 + versionCode: '1020503' versionName: 1.2.5 - androidupdate: [] antcommands: [] @@ -2103,7 +2103,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020504 + versionCode: '1020504' versionName: 1.2.5 - androidupdate: [] antcommands: [] @@ -2137,7 +2137,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1020505 + versionCode: '1020505' versionName: 1.2.5 - androidupdate: [] antcommands: [] @@ -2171,7 +2171,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1030003 + versionCode: '1030003' versionName: 1.2.6 - androidupdate: [] antcommands: [] @@ -2205,7 +2205,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1030004 + versionCode: '1030004' versionName: 1.2.6 - androidupdate: [] antcommands: [] @@ -2239,7 +2239,7 @@ builds: subdir: vlc-android submodules: false target: null - versionCode: 1030005 + versionCode: '1030005' versionName: 1.2.6 comments: {} id: org.videolan.vlc