mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] When self-upgrading, use a hack to not fill the ended_at and success key right away
This commit is contained in:
parent
f7b5886d10
commit
5e93b5cfd9
1 changed files with 7 additions and 0 deletions
|
@ -688,6 +688,13 @@ def tools_upgrade(operation_logger, apps=None, system=False):
|
|||
update_log_metadata = "sed -i \"s/ended_at: .*$/ended_at: $(date -u +'%Y-%m-%d %H:%M:%S.%N')/\" {}"
|
||||
update_log_metadata = update_log_metadata.format(operation_logger.md_path)
|
||||
|
||||
# Dirty hack such that the operation_logger does not add ended_at
|
||||
# and success keys in the log metadata. (c.f. the code of the
|
||||
# is_unit_operation + operation_logger.close()) We take care of
|
||||
# this ourselves (c.f. the mark_success and updated_log_metadata in
|
||||
# the huge command launched by os.system)
|
||||
operation_logger.ended_at = "notyet"
|
||||
|
||||
upgrade_completed = "\n" + m18n.n("tools_upgrade_special_packages_completed")
|
||||
command = "(({wait} && {cmd}) && {mark_success} || {mark_failure}; {update_metadata}; echo '{done}') &".format(
|
||||
wait=wait_until_end_of_yunohost_command,
|
||||
|
|
Loading…
Add table
Reference in a new issue