mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-11 08:23:49 +00:00
upgrades: Add 10 minute delay before apt update
Ensure that plinth is fully started so that it can detect the apt update, and perform force_upgrades. Test: Perform dist upgrade. At the end, all packages have been upgraded. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
f83c763ab7
commit
72716366c1
@ -12,6 +12,7 @@ import pathlib
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
from plinth.action_utils import (apt_hold, debconf_set_selections,
|
||||
run_apt_command, service_daemon_reload,
|
||||
@ -452,7 +453,9 @@ def _perform_dist_upgrade():
|
||||
print('Restarting FreedomBox service...', flush=True)
|
||||
service_restart('plinth')
|
||||
|
||||
# Update apt cache again to trigger force_upgrades.
|
||||
# After 10 minutes, update apt cache again to trigger force_upgrades.
|
||||
print('Waiting for 10 minutes...', flush=True)
|
||||
time.sleep(10 * 60)
|
||||
print('Updating Apt cache...', flush=True)
|
||||
run_apt_command(['update'])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user