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

This commit is contained in:
Adeeb Shihadeh
2021-09-08 10:47:38 -07:00
committed by GitHub
parent 204e5a0907
commit d4b4204233
2 changed files with 3 additions and 5 deletions
-5
View File
@@ -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
+3
View File
@@ -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")