Merge pull request #117 from Salamandar/fix_apt_linter

Fix package linter on apt list
This commit is contained in:
Alexandre Aubin 2023-09-06 15:32:03 +02:00 committed by GitHub
commit c6cbd26235
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1964,7 +1964,11 @@ class Manifest(TestSuite):
)
dbtype = resources["database"]["type"]
apt_packages = [p.strip(',') for p in resources["apt"].get("packages", "").split(" ")]
apt_packages = resources["apt"].get("packages", [])
if isinstance(apt_packages, str):
apt_packages = [value.strip() for value in apt_packages.split(",")]
if dbtype == "mysql" and "mariadb-server" not in apt_packages:
yield Warning(
"When using a mysql database, you should add mariadb-server in apt dependencies. Even though it's currently installed by default in YunoHost installations, it might not be in the future !"