From c2f55552d6bfd4d6e1ed527a3d634550d2a6caa5 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 16 Aug 2022 23:32:48 +0200 Subject: [PATCH] Report setting_set of is_public in upgrade script as an error ... the only apps still doing this have pending changes in testing to fix it --- package_linter.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/package_linter.py b/package_linter.py index 419257a..7d065d5 100755 --- a/package_linter.py +++ b/package_linter.py @@ -2120,9 +2120,14 @@ class Script(TestSuite): @test() def set_is_public_setting(self): if self.containsregex(r"ynh_app_setting_set .*is_public.*"): - yield Warning( - "permission system: it should not be needed to save is_public with ynh_app_setting_set ... this setting should only be used during installation to initialize the permission. The admin is likely to manually tweak the permission using YunoHost's interface later." - ) + if self.name == "upgrade": + yield Error( + "permission system: it should not be needed to save is_public with ynh_app_setting_set ... this setting should only be used during installation to initialize the permission. The admin is likely to manually tweak the permission using YunoHost's interface later." + ) + else: + yield Warning( + "permission system: it should not be needed to save is_public with ynh_app_setting_set ... this setting should only be used during installation to initialize the permission. The admin is likely to manually tweak the permission using YunoHost's interface later." + ) @test(ignore=["install", "_common.sh"]) def get_is_public_setting(self):