aptitude_with_progress_bar: delay the yunohost-api restart such that the migration doesnt appear as failed from the webamin

This commit is contained in:
Alexandre Aubin 2024-07-04 19:13:43 +02:00 committed by Félix Piédallu
parent ac4e9cd216
commit e8849fefce

View file

@ -287,6 +287,11 @@ def aptitude_with_progress_bar(cmd):
f'LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none aptitude {cmd} --quiet=2 -o=Dpkg::Use-Pty=0 -o "APT::Status-Fd=$YNH_STDINFO"'
)
# If upgrading yunohost from the API, delay the Yunohost-api restart
# (this should be the last time we need it before bookworm, because on bookworm, yunohost-admin cookies will be persistent upon api restart)
if " yunohost " in cmd and Moulinette.interface.type == "api":
cmd = "YUNOHOST_API_RESTART_WILL_BE_HANDLED_BY_YUNOHOST=yes " + cmd
logger.debug(f"Running: {cmd}")
ret = call_async_output(cmd, callbacks, shell=True)