From 72716366c1af38930132b8d979ff98eca19aeee0 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Sun, 7 Feb 2021 20:30:03 -0500 Subject: [PATCH] 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 Reviewed-by: Sunil Mohan Adapa --- actions/upgrades | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/actions/upgrades b/actions/upgrades index 87f20888b..f5740fa64 100755 --- a/actions/upgrades +++ b/actions/upgrades @@ -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'])