mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
[bootstrap/win] Replace "python.bat" only on downgrade.
We're implementing a bootstrap downgrade for potential revert of https://chromium-review.googlesource.com/c/563036 Currently, the downgrade sees the presence of the landed patch as a sign to completely reinstall Python. However, this causes the "python276_bin" directory to be deleted, which both ruins any running process (notably "service manager" and BuildBot) and fails due to those running processes, leaving the system in a broken state. Instead, we'll view the revert path as a signal to swap in the old "python.bat" specifically, then fall through to standard installation detection. Since the upgrade will not actually delete "python276_bin", the expected revert case will leave it alone, preserving existing execution environments. BUG=chromium:740966, chromium:740171 TEST=local - Ran simulation of revert path with this change, observed better outcome. Change-Id: I0dfa5924a27bcaba49134272a344f7b9f1d475c5 Reviewed-on: https://chromium-review.googlesource.com/567167 Reviewed-by: Robbie Iannucci <iannucci@chromium.org> Commit-Queue: Daniel Jacques <dnj@chromium.org>
This commit is contained in:
@@ -33,9 +33,8 @@ if "%1" == "force" (
|
||||
:: destroy our "python.bat" if we detect a "python_bin_reldir.txt" file
|
||||
:: present, causing us to reinstall Python.
|
||||
if exist "%WIN_TOOLS_ROOT_DIR%\python_bin_reldir.txt" (
|
||||
del "%WIN_TOOLS_ROOT_DIR%\python.bat"
|
||||
call copy /y "%~dp0python276.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul
|
||||
del "%WIN_TOOLS_ROOT_DIR%\python_bin_reldir.txt"
|
||||
goto :PY27_INSTALL
|
||||
)
|
||||
|
||||
if not exist "%WIN_TOOLS_ROOT_DIR%\python276_bin" goto :PY27_INSTALL
|
||||
|
||||
Reference in New Issue
Block a user