updated: log git diff on overlay init (#20476)
* updated: log git diff on overlay init * add git diff param * paramsalbatross
parent
e7fc11c7fb
commit
bcb6879199
|
@ -28,6 +28,7 @@ keys = {
|
||||||
b"DisableUpdates": [TxType.PERSISTENT],
|
b"DisableUpdates": [TxType.PERSISTENT],
|
||||||
b"DoUninstall": [TxType.CLEAR_ON_MANAGER_START],
|
b"DoUninstall": [TxType.CLEAR_ON_MANAGER_START],
|
||||||
b"DongleId": [TxType.PERSISTENT],
|
b"DongleId": [TxType.PERSISTENT],
|
||||||
|
b"GitDiff": [TxType.PERSISTENT],
|
||||||
b"GitBranch": [TxType.PERSISTENT],
|
b"GitBranch": [TxType.PERSISTENT],
|
||||||
b"GitCommit": [TxType.PERSISTENT],
|
b"GitCommit": [TxType.PERSISTENT],
|
||||||
b"GitRemote": [TxType.PERSISTENT],
|
b"GitRemote": [TxType.PERSISTENT],
|
||||||
|
|
|
@ -164,7 +164,8 @@ def init_overlay() -> None:
|
||||||
|
|
||||||
cloudlog.info("preparing new safe staging area")
|
cloudlog.info("preparing new safe staging area")
|
||||||
|
|
||||||
Params().put("UpdateAvailable", "0")
|
params = Params()
|
||||||
|
params.put("UpdateAvailable", "0")
|
||||||
set_consistent_flag(False)
|
set_consistent_flag(False)
|
||||||
dismount_overlay()
|
dismount_overlay()
|
||||||
if os.path.isdir(STAGING_ROOT):
|
if os.path.isdir(STAGING_ROOT):
|
||||||
|
@ -196,6 +197,10 @@ def init_overlay() -> None:
|
||||||
else:
|
else:
|
||||||
run(mount_cmd)
|
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:
|
def finalize_update() -> None:
|
||||||
"""Take the current OverlayFS merged view and finalize a copy outside of
|
"""Take the current OverlayFS merged view and finalize a copy outside of
|
||||||
|
|
Loading…
Reference in New Issue