From 2a4798c403013be04d26a54dcddb254bd1aabe25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 22 Mar 2025 04:40:14 +0100 Subject: [PATCH] vmupdate: don't fail if apt lock file doesn't exist This is the case after fresh template installation. Fixes QubesOS/qubes-issues#9857 --- vmupdate/agent/source/apt/apt_cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vmupdate/agent/source/apt/apt_cli.py b/vmupdate/agent/source/apt/apt_cli.py index e6077f3..9779ad7 100644 --- a/vmupdate/agent/source/apt/apt_cli.py +++ b/vmupdate/agent/source/apt/apt_cli.py @@ -52,6 +52,8 @@ def wait_for_lock(self): """ Wait for any other apt-get instance to finish. """ + if not os.path.exists("/var/lib/apt/lists/lock"): + return with self.apt_lock(): pass