From c6dcd98e7e071ab91109d05f5d0a5737798790cc Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 23 Jul 2024 19:45:35 +0200 Subject: [PATCH] Report using /opt/yunohost as install dir as a warning >_> --- package_linter.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package_linter.py b/package_linter.py index dfd831d..5fadf16 100755 --- a/package_linter.py +++ b/package_linter.py @@ -2099,6 +2099,15 @@ class Manifest(TestSuite): "each time the upstream version changes." ) + @test() + def custom_install_dir(self): + custom_install_dir = self.manifest.get("resources", {}).get("install_dir", {}).get("dir") + if not custom_install_dir: + return + + if custom_install_dir.startswith("/opt/yunohost"): + yield Warning("Installing apps in /opt/yunohost is deprecated ... YunoHost is about standardization, and the standard is to install in /var/www/__APP__ (yes, even if not a webapp, because whatever). Please stick to the default value. the resource system should automatically move the install dir if needed so you don't really need to think about backward compatibility.") + @test() def install_args(self):