update_manager: prevent apt from fetching updates on startup

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2021-12-05 09:14:49 -05:00
parent f22e16d8cc
commit 6a90bfa480

View File

@ -784,8 +784,8 @@ class PackageDeploy(BaseDeploy):
self.refresh_evt = asyncio.Event()
try:
# Do not force a refresh until the server has started
force = self.server.is_running()
await self._update_apt(force=force)
if self.server.is_running():
await self._update_apt(force=True)
res = await self.cmd_helper.run_cmd_with_response(
"apt list --upgradable", timeout=60.)
pkg_list = [p.strip() for p in res.split("\n") if p.strip()]