From c23faac9df518e6c2b7f4d915eddae189cf84d8e Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Tue, 29 Sep 2020 12:08:55 -0700 Subject: [PATCH] updated: log git corruption (#2242) * log git corruption * better cloudlog old-commit-hash: 3f40a9ee7590f95743dd5914ca81496f1419f402 --- selfdrive/updated.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/selfdrive/updated.py b/selfdrive/updated.py index 01083d1076..6c06f46ae0 100755 --- a/selfdrive/updated.py +++ b/selfdrive/updated.py @@ -201,6 +201,11 @@ def finalize_update() -> None: shutil.rmtree(FINALIZED) shutil.copytree(OVERLAY_MERGED, FINALIZED, symlinks=True) + # Log git repo corruption + fsck = run(["git", "fsck", "--no-progress"], FINALIZED).rstrip() + if len(fsck): + cloudlog.error(f"found git corruption, git fsck:\n{fsck}") + set_consistent_flag(True) cloudlog.info("done finalizing overlay")