bullseye->bookworm: force-regen the nsswitch configuration because for some reason it gets reset?

This commit is contained in:
Alexandre Aubin 2024-07-04 19:27:51 +02:00
parent 772e772b24
commit c694ea2cbc

View file

@ -12,7 +12,7 @@ from yunohost.tools import (
tools_update,
)
from yunohost.app import unstable_apps
from yunohost.regenconf import manually_modified_files
from yunohost.regenconf import manually_modified_files, regen_conf
from yunohost.utils.system import (
free_space_in_directory,
get_ynh_package_version,
@ -181,6 +181,11 @@ class MyMigration(Migration):
# FIXME : find a way to simulate and validate the upgrade first
aptitude_with_progress_bar("full-upgrade --show-why -y -o Dpkg::Options::='--force-confold'")
# Force regenconf of nsswitch because for some reason
# /etc/nsswitch.conf is reset despite the --force-confold? It's a
# disaster because then admins cannot "sudo" >_> ...
regen_conf(names=["nsswitch"], force=True)
if self.debian_major_version() == N_CURRENT_DEBIAN:
raise YunohostError("migration_0027_still_on_bullseye_after_main_upgrade")