From bcb6879199948c21f1ebef9afc2a63f433309c00 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 25 Mar 2021 16:16:12 -0700 Subject: [PATCH] updated: log git diff on overlay init (#20476) * updated: log git diff on overlay init * add git diff param * params --- common/params_pyx.pyx | 1 + selfdrive/updated.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/common/params_pyx.pyx b/common/params_pyx.pyx index 07ef33a22..2add3a077 100755 --- a/common/params_pyx.pyx +++ b/common/params_pyx.pyx @@ -28,6 +28,7 @@ keys = { b"DisableUpdates": [TxType.PERSISTENT], b"DoUninstall": [TxType.CLEAR_ON_MANAGER_START], b"DongleId": [TxType.PERSISTENT], + b"GitDiff": [TxType.PERSISTENT], b"GitBranch": [TxType.PERSISTENT], b"GitCommit": [TxType.PERSISTENT], b"GitRemote": [TxType.PERSISTENT], diff --git a/selfdrive/updated.py b/selfdrive/updated.py index bc08a8a34..035b9a967 100755 --- a/selfdrive/updated.py +++ b/selfdrive/updated.py @@ -164,7 +164,8 @@ def init_overlay() -> None: cloudlog.info("preparing new safe staging area") - Params().put("UpdateAvailable", "0") + params = Params() + params.put("UpdateAvailable", "0") set_consistent_flag(False) dismount_overlay() if os.path.isdir(STAGING_ROOT): @@ -196,6 +197,10 @@ def init_overlay() -> None: else: run(mount_cmd) + git_diff = run(["git", "diff"], OVERLAY_MERGED, low_priority=True) + params.put("GitDiff", git_diff) + cloudlog.info(f"git diff output:\n{git_diff}") + def finalize_update() -> None: """Take the current OverlayFS merged view and finalize a copy outside of