appsv2: ignore the old/ugly/legacy removal of apt deps when removing the php conf, because that's handled by the apt resource

This commit is contained in:
Alexandre Aubin 2023-02-03 21:05:23 +01:00
parent 9459aed65e
commit 3bbba640e9

View file

@ -283,7 +283,7 @@ ynh_remove_fpm_config() {
# If the PHP version used is not the default version for YunoHost
# The second part with YNH_APP_PURGE is an ugly hack to guess that we're inside the remove script
# (we don't actually care about its value, we just check its not empty hence it exists)
if [ "$phpversion" != "$YNH_DEFAULT_PHP_VERSION" ] && [ -n "${YNH_APP_PURGE:-}" ]; then
if [ "$phpversion" != "$YNH_DEFAULT_PHP_VERSION" ] && [ -n "${YNH_APP_PURGE:-}" ] && dpkg --compare-versions ${YNH_APP_PACKAGING_FORMAT:-0} lt 2; then
# Remove app dependencies ... but ideally should happen via an explicit call from packager
ynh_remove_app_dependencies
fi