Commit e8eed65f authored by Dan Jacques's avatar Dan Jacques Committed by Daniel Jacques

Always copy "python.bat".

This change should be safe, since batch files are not generally
write-contended, and "gclient" is run atomically (other things depend on
this).

The mechanism to detect whether we're downgrading is broken by
"bot_update". While future syncs should not encounter this issue,
current syncs still have no way to resolve it, and are left with a
broken "python.bat" setup.

We remedy this by always installing "python.bat", even if it's already
there. This is safe, since the intended state of HEAD is for this file
to be present at all times.

BUG=chromium:741650
TEST=None

Change-Id: Ief28217bf89d201d830c46b31e0b4040c51cb322
Reviewed-on: https://chromium-review.googlesource.com/568588Reviewed-by: 's avatarSergey Berezin <sergeyberezin@chromium.org>
parent aab09ca6
......@@ -26,19 +26,13 @@ if "%1" == "force" (
:PYTHON_CHECK
:: Support revert from https://chromium-review.googlesource.com/c/563036
::
:: If the "python.bat" from that CL is installed, we will not know to
:: replace it if the CL is reverted. To support this, we will actively
:: 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" (
call copy /y "%~dp0python276.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul
del "%WIN_TOOLS_ROOT_DIR%\python_bin_reldir.txt"
)
if not exist "%WIN_TOOLS_ROOT_DIR%\python276_bin" goto :PY27_INSTALL
if not exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :PY27_INSTALL
:: Support revert from https://chromium-review.googlesource.com/c/563036
:: Temporary fix, always install "python.bat" (crbug.com/741650).
call copy /y "%~dp0python276.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul
set ERRORLEVEL=0
goto :GIT_CHECK
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment