errors on gclient initial run

777 views
Skip to first unread message

Hong Zhang

unread,
Sep 15, 2017, 1:45:15 AM9/15/17
to Chromium-dev
Hi,

I used to be able to set up chromium dev environment, but this time I am on a new machine. It is Windows 10. The only thing I went through was,

- Download depot_tools bundle and unzip
- Set proper PATH in environment variable
- Set DEPOT_TOOLS_WIN_TOOLCHAIN to 0, but should not be related.
- Run gclient in an empty CMD

I got some file access error as,



C
:\Windows\system32>gclient
Bootstrapping cipd client for windows-amd64 from https://chrome-infra-packages.appspot.com/client?platform=windows-amd64&version=git_revision:0aa5e4d06ec4d3b90980fcb0d0b7c34a5e65b9e1...
[P4540 22:36:07.103 fs.go:341 W] fs: failed to rename("C:\\worktools\\depot_tools\\win_tools-2_7_6_bin\\.cipd\\pkgs\\1\\ugJK01shkgjn\\x", "C:\\worktools\\depot_tools\\win_tools-2_7_6_bin\\.cipd\\pkgs\\1\\ad63cbd3e9fcc5f30e4657a95bd99000ff1716ef") - Access is denied.
[P4540 22:36:07.110 fs.go:287 W] fs: failed to rename directory C:\worktools\depot_tools\win_tools-2_7_6_bin\.cipd\pkgs\1\ugJK01shkgjn - Access is denied.
[P4540 22:36:07.112 client.go:1378 E] Failed to install infra/python/cpython/windows-386:ad63cbd3e9fcc5f30e4657a95bd99000ff1716ef - Access is denied.
Error: failed to update packages, see the log.
'python' is not recognized as an internal or external command,
operable program
or batch file.

I guess someone else has the similar thing too in http://magpcss.org/ceforum/viewtopic.php?f=6&t=14958, but there was not a solution.

Please help!

-Hong

Paweł Hajdan, Jr.

unread,
Sep 15, 2017, 6:45:12 AM9/15/17
to maho...@gmail.com, infr...@chromium.org, Chromium-dev
+infra-dev

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/8edfc3a2-90df-4e71-93e4-3dc01f43628c%40chromium.org.

Hong Zhang

unread,
Sep 15, 2017, 12:58:26 PM9/15/17
to Chromium-dev, maho...@gmail.com, infr...@chromium.org
Dear infrastructure developers,

Any suggestion is appreciated!

Cheers,
-Hong

Hong Zhang

unread,
Sep 15, 2017, 9:26:33 PM9/15/17
to Chromium-dev, maho...@gmail.com, infr...@chromium.org
Hi guys,

Never mind for now, unless you deem the output useful for your test. My machine waked up from sleep mode and this problem is gone. I cannot explain this though.

Thanks anyway.

-Hong

Yang Zhang

unread,
Jan 28, 2019, 11:36:18 AM1/28/19
to Chromium-dev
If checkout infra from https://chromium.googlesource.com/infra/infra, you will see no "infra/python/cpython/windows-386" directory in this repo.
I trace the problem, find the code in depot_tools/bootstrap/win/win_tools.bat +60 cause this problem, 
echo "%CIPD_EXE%" ensure -log-level warning -ensure-file "%~dp0%CIPD_MANIFEST%" -root "%WIN_TOOLS_PATH%"

This line try to call cipd to download manifests.txt descrbe two repo files into target directory, 
@Subdir python
infra/python/cpython/windows-386 version:2.7.6

@Subdir git
infra/git/windows-${arch} version:2.20.1.chromium16

If you see the win_tools.bat next usage, you will find the bat will use the python.exe in above cpid download repo package, so you can use system python2 to replace to omit this download.
:: This executes "win_tools.py" using the bundle's Python interpreter.
set WIN_TOOLS_PYTHON_BIN=%WIN_TOOLS_PATH%\python\bin\python.exe
call "%WIN_TOOLS_PYTHON_BIN%" "%~dp0win_tools.py" %WIN_TOOLS_EXTRA_ARGS%

so you can see full change below
--- a/bootstrap/win/win_tools.bat
+++ b/bootstrap/win/win_tools.bat
@@ -58,11 +58,13 @@ set WIN_TOOLS_EXTRA_ARGS=%WIN_TOOLS_EXTRA_ARGS% --win-tools-name "%WIN_TOOLS_NAM
 :: Install our CIPD packages. The CIPD client self-bootstraps.
 :: See "//cipd.bat" and "//cipd.ps1" for more information.
 set CIPD_EXE=%WIN_TOOLS_ROOT_DIR%\cipd.bat
-call "%CIPD_EXE%" ensure -log-level warning -ensure-file "%~dp0%CIPD_MANIFEST%" -root "%WIN_TOOLS_PATH%"
+echo "%CIPD_EXE%" ensure -log-level warning -ensure-file "%~dp0%CIPD_MANIFEST%" -root "%WIN_TOOLS_PATH%"
+:: call "%CIPD_EXE%" ensure -log-level warning -ensure-file "%~dp0%CIPD_MANIFEST%" -root"%WIN_TOOLS_PATH%"
 if errorlevel 1 goto :END

 :: This executes "win_tools.py" using the bundle's Python interpreter.
-set WIN_TOOLS_PYTHON_BIN=%WIN_TOOLS_PATH%\python\bin\python.exe
+:: set WIN_TOOLS_PYTHON_BIN=%WIN_TOOLS_PATH%\python\bin\python.exe
+set WIN_TOOLS_PYTHON_BIN=C:\Python27\python.exe^M
 call "%WIN_TOOLS_PYTHON_BIN%" "%~dp0win_tools.py" %WIN_TOOLS_EXTRA_ARGS%

在 2017年9月15日星期五 UTC+8下午1:45:15,Hong Zhang写道:
Reply all
Reply to author
Forward
0 new messages