From 8b54e2b4cf95dcad4410d3587cc39653f2c5417b Mon Sep 17 00:00:00 2001 From: Licaon_Kter Date: Fri, 11 Jul 2025 18:08:19 +0300 Subject: [PATCH] Remove UpstreamNonFree --- tests/config/antiFeatures.yml | 4 -- tests/config/de/antiFeatures.yml | 4 -- tests/config/fa/antiFeatures.yml | 4 -- tests/config/ro/antiFeatures.yml | 4 -- tests/config/zh-rCN/antiFeatures.yml | 4 -- .../app.with.special.build.params.yml | 2 +- .../app.with.special.build.params.yml | 2 +- tests/metadata/com.politedroid.yml | 2 - .../dump/app.with.special.build.params.yaml | 2 +- tests/metadata/dump/com.politedroid.yaml | 2 - tests/repo/entry.json | 4 +- tests/repo/index-v1.json | 6 +-- tests/repo/index-v2.json | 49 +------------------ tests/repo/index.xml | 2 +- tests/test_common.py | 1 - tests/test_lint.py | 2 +- tests/test_metadata.py | 14 ++---- tests/test_rewritemeta.py | 1 - tests/test_update.py | 2 +- 19 files changed, 16 insertions(+), 95 deletions(-) diff --git a/tests/config/antiFeatures.yml b/tests/config/antiFeatures.yml index 06d794a1..cb4dc676 100644 --- a/tests/config/antiFeatures.yml +++ b/tests/config/antiFeatures.yml @@ -39,7 +39,3 @@ Tracking: description: This app tracks and reports your activity icon: ic_antifeature_tracking.xml name: Tracking -UpstreamNonFree: - description: The upstream source code is not entirely Free - icon: ic_antifeature_upstreamnonfree.xml - name: Upstream Non-Free diff --git a/tests/config/de/antiFeatures.yml b/tests/config/de/antiFeatures.yml index 3053e41a..65111db1 100644 --- a/tests/config/de/antiFeatures.yml +++ b/tests/config/de/antiFeatures.yml @@ -38,7 +38,3 @@ Tracking: description: Diese App verfolgt und versendet Ihre Aktivitäten icon: ic_antifeature_tracking.xml name: Tracking -UpstreamNonFree: - description: Der Originalcode ist nicht völlig quelloffen - icon: ic_antifeature_upstreamnonfree.xml - name: Originalcode nicht-quelloffen diff --git a/tests/config/fa/antiFeatures.yml b/tests/config/fa/antiFeatures.yml index 554dcee9..aa8290ef 100644 --- a/tests/config/fa/antiFeatures.yml +++ b/tests/config/fa/antiFeatures.yml @@ -37,7 +37,3 @@ Tracking: description: این کاره، فعّالیتتان را ردیابی و گزارش می‌کند icon: ic_antifeature_tracking.xml name: ردیابی -UpstreamNonFree: - description: کد مبدأ بالادستی کاملاً آزاد نیست - icon: ic_antifeature_upstreamnonfree.xml - name: بالادست ناآزاد diff --git a/tests/config/ro/antiFeatures.yml b/tests/config/ro/antiFeatures.yml index 97d61172..9610b448 100644 --- a/tests/config/ro/antiFeatures.yml +++ b/tests/config/ro/antiFeatures.yml @@ -38,7 +38,3 @@ Tracking: description: Aplicația îți înregistrează și raportează activitatea undeva icon: ic_antifeature_tracking.xml name: Urmărire -UpstreamNonFree: - description: Codul sursa originar nu este în totalitatea lui software liber - icon: ic_antifeature_upstreamnonfree.xml - name: Surse ne-libere diff --git a/tests/config/zh-rCN/antiFeatures.yml b/tests/config/zh-rCN/antiFeatures.yml index a1b287b9..2c9f0819 100644 --- a/tests/config/zh-rCN/antiFeatures.yml +++ b/tests/config/zh-rCN/antiFeatures.yml @@ -37,7 +37,3 @@ Tracking: description: 此应用会记录并报告你的活动 icon: ic_antifeature_tracking.xml name: 跟踪用户 -UpstreamNonFree: - description: 上游源代码不是完全自由的 - icon: ic_antifeature_upstreamnonfree.xml - name: 上游代码非自由 diff --git a/tests/metadata-rewrite-yml/app.with.special.build.params.yml b/tests/metadata-rewrite-yml/app.with.special.build.params.yml index 0fc97b65..95c1695c 100644 --- a/tests/metadata-rewrite-yml/app.with.special.build.params.yml +++ b/tests/metadata-rewrite-yml/app.with.special.build.params.yml @@ -1,5 +1,5 @@ AntiFeatures: - - UpstreamNonFree + - Tracking Categories: - System License: GPL-3.0-only diff --git a/tests/metadata/app.with.special.build.params.yml b/tests/metadata/app.with.special.build.params.yml index d12c713c..c58cadf1 100644 --- a/tests/metadata/app.with.special.build.params.yml +++ b/tests/metadata/app.with.special.build.params.yml @@ -1,5 +1,5 @@ AntiFeatures: - - UpstreamNonFree + - Tracking Categories: - System License: GPL-3.0-only diff --git a/tests/metadata/com.politedroid.yml b/tests/metadata/com.politedroid.yml index cd474d6c..87d13bcb 100644 --- a/tests/metadata/com.politedroid.yml +++ b/tests/metadata/com.politedroid.yml @@ -22,7 +22,6 @@ Builds: target: android-10 antifeatures: - KnownVuln - - UpstreamNonFree - NonFreeAssets - versionName: '1.3' @@ -43,7 +42,6 @@ Builds: - yes antifeatures: - KnownVuln - - UpstreamNonFree - NonFreeAssets ArchivePolicy: 4 versions diff --git a/tests/metadata/dump/app.with.special.build.params.yaml b/tests/metadata/dump/app.with.special.build.params.yaml index 9f2c61f6..fae6c9ae 100644 --- a/tests/metadata/dump/app.with.special.build.params.yaml +++ b/tests/metadata/dump/app.with.special.build.params.yaml @@ -2,7 +2,7 @@ --- AllowedAPKSigningKeys: [] AntiFeatures: - UpstreamNonFree: {} + Tracking: {} ArchivePolicy: 0 AuthorEmail: null AuthorName: null diff --git a/tests/metadata/dump/com.politedroid.yaml b/tests/metadata/dump/com.politedroid.yaml index b4d56c3e..01d55b82 100644 --- a/tests/metadata/dump/com.politedroid.yaml +++ b/tests/metadata/dump/com.politedroid.yaml @@ -19,7 +19,6 @@ Builds: antifeatures: KnownVuln: {} NonFreeAssets: {} - UpstreamNonFree: {} binary: null build: '' buildjni: [] @@ -127,7 +126,6 @@ Builds: antifeatures: KnownVuln: {} NonFreeAssets: {} - UpstreamNonFree: {} binary: null build: '' buildjni: [] diff --git a/tests/repo/entry.json b/tests/repo/entry.json index 1eb017bc..85b6b14f 100644 --- a/tests/repo/entry.json +++ b/tests/repo/entry.json @@ -3,8 +3,8 @@ "version": 20002, "index": { "name": "/index-v2.json", - "sha256": "f0912b64db80168ee807f43ab3470bb709b6659aee05ad63057dcbcd1c97dc5e", - "size": 55186, + "sha256": "94dca5f4398d2a0167bbe69c790cdd66f1bc305ca5e362ee5e3f793e9f88e3cf", + "size": 53355, "numPackages": 11 }, "diffs": {} diff --git a/tests/repo/index-v1.json b/tests/repo/index-v1.json index ed1cbcde..03f8f060 100644 --- a/tests/repo/index-v1.json +++ b/tests/repo/index-v1.json @@ -244,8 +244,7 @@ "added": 1498176000000, "antiFeatures": [ "KnownVuln", - "NonFreeAssets", - "UpstreamNonFree" + "NonFreeAssets" ], "apkName": "com.politedroid_6.apk", "hash": "70c2f776a2bac38a58a7d521f96ee0414c6f0fb1de973c3ca8b10862a009247d", @@ -332,8 +331,7 @@ "added": 1498176000000, "antiFeatures": [ "KnownVuln", - "NonFreeAssets", - "UpstreamNonFree" + "NonFreeAssets" ], "apkName": "com.politedroid_3.apk", "hash": "665d03d61ebc642289fda697f71a59305b0202b16cafc5ffdae91cbe91f0b25d", diff --git a/tests/repo/index-v2.json b/tests/repo/index-v2.json index 96c2cfea..263dffd2 100644 --- a/tests/repo/index-v2.json +++ b/tests/repo/index-v2.json @@ -453,49 +453,6 @@ "ro": "Urmărire", "zh-rCN": "跟踪用户" } - }, - "UpstreamNonFree": { - "description": { - "de": "Der Originalcode ist nicht völlig quelloffen", - "en-US": "The upstream source code is not entirely Free", - "fa": "کد مبدأ بالادستی کاملاً آزاد نیست", - "ro": "Codul sursa originar nu este în totalitatea lui software liber", - "zh-rCN": "上游源代码不是完全自由的" - }, - "icon": { - "de": { - "name": "/icons/ic_antifeature_upstreamnonfree.xml", - "sha256": "06a9af843ff56ecd7a270f98c0b19b3154edf3ffa854e6d50a84ef00d0ce1a86", - "size": 1442 - }, - "en-US": { - "name": "/icons/ic_antifeature_upstreamnonfree.xml", - "sha256": "06a9af843ff56ecd7a270f98c0b19b3154edf3ffa854e6d50a84ef00d0ce1a86", - "size": 1442 - }, - "fa": { - "name": "/icons/ic_antifeature_upstreamnonfree.xml", - "sha256": "06a9af843ff56ecd7a270f98c0b19b3154edf3ffa854e6d50a84ef00d0ce1a86", - "size": 1442 - }, - "ro": { - "name": "/icons/ic_antifeature_upstreamnonfree.xml", - "sha256": "06a9af843ff56ecd7a270f98c0b19b3154edf3ffa854e6d50a84ef00d0ce1a86", - "size": 1442 - }, - "zh-rCN": { - "name": "/icons/ic_antifeature_upstreamnonfree.xml", - "sha256": "06a9af843ff56ecd7a270f98c0b19b3154edf3ffa854e6d50a84ef00d0ce1a86", - "size": 1442 - } - }, - "name": { - "de": "Originalcode nicht-quelloffen", - "en-US": "Upstream Non-Free", - "fa": "بالادست ناآزاد", - "ro": "Surse ne-libere", - "zh-rCN": "上游代码非自由" - } } }, "categories": { @@ -627,8 +584,7 @@ "en-US": "1.5" }, "NonFreeAssets": {}, - "NonFreeNet": {}, - "UpstreamNonFree": {} + "NonFreeNet": {} } }, "5bdbfa071cca4b8d05ced41d6b28763595d6e8096cca5bbf0f9253c9a2622e5d": { @@ -756,8 +712,7 @@ "en-US": "1.5" }, "NonFreeAssets": {}, - "NonFreeNet": {}, - "UpstreamNonFree": {} + "NonFreeNet": {} } } } diff --git a/tests/repo/index.xml b/tests/repo/index.xml index 4036a6f7..04e8f87d 100644 --- a/tests/repo/index.xml +++ b/tests/repo/index.xml @@ -346,7 +346,7 @@ APK is called F-Droid Privileged Extension. https://github.com/miguelvps/PoliteDroid/issues 1.5 6 - KnownVuln,NoSourceSince,NonFreeAssets,NonFreeNet,UpstreamNonFree + KnownVuln,NoSourceSince,NonFreeAssets,NonFreeNet 1.5 6 diff --git a/tests/test_common.py b/tests/test_common.py index de08a5d7..3110b446 100755 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -2784,7 +2784,6 @@ class CommonTest(SetUpTearDownMixin, unittest.TestCase): 'NonFreeDep', 'NonFreeNet', 'Tracking', - 'UpstreamNonFree', ], list(antiFeatures.keys()), ) diff --git a/tests/test_lint.py b/tests/test_lint.py index 4b5d7dfe..37b7ce95 100755 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -510,7 +510,7 @@ class LintAntiFeaturesTest(unittest.TestCase): def test_check_antiFeatures(self): app = fdroidserver.metadata.App() - app['AntiFeatures'] = ['Ads', 'UpstreamNonFree'] + app['AntiFeatures'] = ['Ads', 'Tracking'] self.assertEqual([], list(fdroidserver.lint.check_antiFeatures(app))) def test_check_antiFeatures_fails_one(self): diff --git a/tests/test_metadata.py b/tests/test_metadata.py index f9e2ba75..84040024 100755 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -672,7 +672,7 @@ class MetadataTest(unittest.TestCase): """Definitions in .yml files should override the localized versions.""" app = metadata.parse_metadata('metadata/app.with.special.build.params.yml') - self.assertEqual(app['AntiFeatures'], {'UpstreamNonFree': {}}) + self.assertEqual(app['AntiFeatures'], {'Tracking': {}}) self.assertEqual(49, app['Builds'][-3]['versionCode']) self.assertEqual( @@ -961,7 +961,6 @@ class MetadataTest(unittest.TestCase): - versionCode: 123 antifeatures: - KnownVuln - - UpstreamNonFree - NonFreeAssets """ ) @@ -972,11 +971,7 @@ class MetadataTest(unittest.TestCase): 'AntiFeatures': {'Ads': {}}, 'Builds': [ { - 'antifeatures': { - 'KnownVuln': {}, - 'NonFreeAssets': {}, - 'UpstreamNonFree': {}, - }, + 'antifeatures': {'KnownVuln': {}, 'NonFreeAssets': {}}, 'versionCode': 123, } ], @@ -997,7 +992,7 @@ class MetadataTest(unittest.TestCase): es: 2nd az: zero en-US: first - UpstreamNonFree: + Tracking: NonFreeAssets: AntiFeatures: NonFreeDep: @@ -1019,7 +1014,7 @@ class MetadataTest(unittest.TestCase): 'antifeatures': { 'KnownVuln': {'az': 'zero', 'en-US': 'first', 'es': '2nd'}, 'NonFreeAssets': {}, - 'UpstreamNonFree': {}, + 'Tracking': {}, }, 'versionCode': 123, } @@ -1873,7 +1868,6 @@ class MetadataTest(unittest.TestCase): antifeatures: - KnownVuln - NonFreeAssets - - UpstreamNonFree ArchivePolicy: 4 AutoUpdateMode: Version v%v diff --git a/tests/test_rewritemeta.py b/tests/test_rewritemeta.py index 4528f219..4dcdd03f 100755 --- a/tests/test_rewritemeta.py +++ b/tests/test_rewritemeta.py @@ -40,7 +40,6 @@ class RewriteMetaTest(unittest.TestCase): 'target': 'android-10', 'antifeatures': { 'KnownVuln': {}, - 'UpstreamNonFree': {}, 'NonFreeAssets': {}, }, }, diff --git a/tests/test_update.py b/tests/test_update.py index 10f9cc8b..623f48cc 100755 --- a/tests/test_update.py +++ b/tests/test_update.py @@ -1375,7 +1375,7 @@ class UpdateTest(unittest.TestCase): if apk['packageName'] == 'com.politedroid' and apk['versionCode'] == 3: antiFeatures = apk.get('antiFeatures') self.assertTrue('KnownVuln' in antiFeatures) - self.assertEqual(3, len(antiFeatures)) + self.assertEqual(2, len(antiFeatures)) foundtest = True self.assertTrue(foundtest)