From 8b8e77575c99e38bc38271d792608e2c49e4e62d Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 29 Jul 2021 19:50:34 -0700 Subject: [PATCH] fix crash due to permissions when clearing update staging dir (#21790) old-commit-hash: 3a7444250cb8ac9b6315d76df240de6a4b9aec51 --- selfdrive/updated.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/selfdrive/updated.py b/selfdrive/updated.py index cfe57bee61..cad3275d7c 100755 --- a/selfdrive/updated.py +++ b/selfdrive/updated.py @@ -167,6 +167,8 @@ def init_overlay() -> None: params.put_bool("UpdateAvailable", False) set_consistent_flag(False) dismount_overlay() + if TICI: + run(["sudo", "rm", "-rf", STAGING_ROOT]) if os.path.isdir(STAGING_ROOT): shutil.rmtree(STAGING_ROOT)