diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 9a45cfb95..e47087976 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -196,7 +196,7 @@ class MyMigration(Migration): " || true" ) - php74packages_to_install = [ + basephp74packages_to_install = [ "php7.4-fpm", "php7.4-common", "php7.4-ldap", @@ -207,7 +207,7 @@ class MyMigration(Migration): "php-php-gettext", ] - php74packages_to_install += [ + php74packages_to_install = basephp74packages_to_install + [ f.strip() for f in check_output(cmd).split("\n") if f.strip() ] @@ -222,6 +222,8 @@ class MyMigration(Migration): "Failed to force the install of php dependencies ?", raw_msg=True ) + os.system(f"apt-mark auto {' '.join(basephp74packages_to_install)}") + # Clean the mess logger.info(m18n.n("migration_0021_cleaning_up")) os.system("apt autoremove --assume-yes") @@ -371,11 +373,11 @@ class MyMigration(Migration): def hold(self, packages): for package in packages: - os.system("apt-mark hold {}".format(package)) + os.system(f"apt-mark hold {package}") def unhold(self, packages): for package in packages: - os.system("apt-mark unhold {}".format(package)) + os.system(f"apt-mark unhold {package}") def apt_install(self, cmd): def is_relevant(line):