updated: move final git reset before finalizing update (#22168)

pull/21821/head
Adeeb Shihadeh 4 years ago committed by GitHub
parent 204e5a0907
commit d4b4204233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      launch_chffrplus.sh
  2. 3
      selfdrive/updated.py

@ -165,11 +165,6 @@ function launch {
mv "${STAGING_ROOT}/finalized" $BASEDIR
cd $BASEDIR
# Partial mitigation for symlink-related filesystem corruption
# Ensure all files match the repo versions after update
git reset --hard
git submodule foreach --recursive git reset --hard
echo "Restarting launch script ${LAUNCHER_LOCATION}"
unset REQUIRED_NEOS_VERSION
unset AGNOS_VERSION

@ -216,6 +216,9 @@ def finalize_update() -> None:
shutil.rmtree(FINALIZED)
shutil.copytree(OVERLAY_MERGED, FINALIZED, symlinks=True)
run(["git", "reset", "--hard"], FINALIZED)
run(["git", "submodule", "foreach", "--recursive", "git", "reset"], FINALIZED)
set_consistent_flag(True)
cloudlog.info("done finalizing overlay")

Loading…
Cancel
Save