From c4732b776e7420c5b19658d61dc36c787f5cf6c5 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 9 Dec 2021 17:13:06 +0100 Subject: [PATCH] migrate_to_bullseye: Remove legacy postgresql service record added by helpers, will now be dynamically handled by the core in bullseye --- src/yunohost/data_migrations/0021_migrate_to_bullseye.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 6ce963625..de53ba8be 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -15,6 +15,7 @@ from yunohost.utils.packages import ( get_ynh_package_version, _list_upgradable_apt_packages, ) +from yunohost.services import _get_services, _save_services logger = getActionLogger("yunohost.migration") @@ -124,6 +125,13 @@ class MyMigration(Migration): # during 0022_php73_to_php74_pools migration self.apt_install("php7.4-fpm -o Dpkg::Options::='--force-confmiss'") + # Remove legacy postgresql service record added by helpers, + # will now be dynamically handled by the core in bullseye + services = _get_services() + if "postgresql" in services: + del services["postgresql"] + _save_services(services) + # # Yunohost upgrade #