Update package_linter.py

This commit is contained in:
yalh76 2022-10-02 22:13:17 +02:00
parent 17ef2139fa
commit 5130c78675

View file

@ -2391,8 +2391,8 @@ class Script(TestSuite):
@test(only=["install", "_common.sh"]) @test(only=["install", "_common.sh"])
def php_deps(self): def php_deps(self):
if self.containsregex("dependencies.*php-"): if self.containsregex("dependencies.*php-"):
# (Stupid hack because some apps like roundcube depend on php-pear and there's no phpx.y-pear >_> ... # (Stupid hack because some apps like roundcube depend on php-pear or php-php-gettext and there's no phpx.y-pear phpx.y-php-gettext>_> ...
if not self.contains("php-pear"): if not self.contains("php-pear") or not self.contains("php-php-gettext"):
yield Warning( yield Warning(
"You should avoid having dependencies like 'php-foobar'. Instead, specify the exact version you want like 'php7.0-foobar'. Otherwise, the *wrong* version of the dependency may be installed if sury is also installed. Note that for Stretch/Buster/Bullseye/... transition, YunoHost will automatically patch your file so there's no need to care about that." "You should avoid having dependencies like 'php-foobar'. Instead, specify the exact version you want like 'php7.0-foobar'. Otherwise, the *wrong* version of the dependency may be installed if sury is also installed. Note that for Stretch/Buster/Bullseye/... transition, YunoHost will automatically patch your file so there's no need to care about that."
) )