Repository: conan-io/conan-center-index

Issue:
add depot_tools cci.20201009
Specify library name and version:  **depot_tools/cci.20201009**

This attempts an update to the `depot_tools` package that was added to CCI in April and wasn't touched since. I'm hoping to use the new version to contribute [the bincrafters recipe for crashpad](https://github.com/bincrafters/conan-crashpad) later on.

- [x] I've read the [guidelines](https://github.com/conan-io/conan-center-index/blob/master/docs/how_to_add_packages.md) for contributing.
- [x] I've followed the [PEP8](https://www.python.org/dev/peps/pep-0008/) style guides for Python code in the recipes.
- [x] I've used the [latest](https://github.com/conan-io/conan/releases/latest) Conan client version.
- [x] I've tried at least one configuration locally with the
      [conan-center hook](https://github.com/conan-io/hooks.git) activated.



Discussion:
*config.yml* syntax error in build 1: 
```
Only one library can be changed in the same PR: [crashpad/all, depot_tools/all]|
```
Some configurations of 'depot_tools/cci.20201009' failed in build 2 (`9a2aa638d394a639489212fe255a9b7fd42b9d05`):
-   **Windows x86_64, Release, Visual Studio 14,  MT**
    - [Log download](https://c3i.jfrog.io/c3i/misc/logs/pr/3182/2/depot_tools/cci.20201009/60b04a80ac4dd5c23f1acffacc679e9902e636e5/create_stdout.txt)
    - [Log error Download](https://c3i.jfrog.io/c3i/misc/logs/pr/3182/2/depot_tools/cci.20201009/60b04a80ac4dd5c23f1acffacc679e9902e636e5/create_stderr.txt)
    - [Profile](https://c3i.jfrog.io/c3i/misc/logs/pr/3182/2/depot_tools/cci.20201009/60b04a80ac4dd5c23f1acffacc679e9902e636e5/profile.txt)
- [Access to all the logs](https://c3i.jfrog.io/c3i/misc/logs/pr/3182/2/depot_tools/cci.20201009/)
Do you know if the auto update situation on Windows was fixed?
Looks like something changed :eyes: 

```
ERROR: depot_tools/cci.20201009 (test package): Error in test() method, line 6
	self.run("gclient --version", run_environment=True)
	ConanException: Error 1 while executing gclient --version
```

```
----Running------
> gclient --version
-----------------
The system cannot find the file C:\J\w\cci_PR-3182\s\6dd70c\1\bin\python3_bin_reldir.txt.

[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] original error: file does not exist
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] 
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] goroutine 1:
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #0 go.chromium.org/luci/vpython/python/interpreter.go:120 - python.(*Interpreter).GetVersion()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #1 go.chromium.org/luci/vpython/venv/config.go:286 - venv.(*Config).resolvePythonInterpreter()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241]   reason: failed to determine Python version for: C:\J\w\cci_PR-3182\s\6dd70c\1\bin\\\python3.exe
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] 
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #2 go.chromium.org/luci/vpython/venv/config.go:186 - venv.(*Config).makeEnv()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241]   reason: failed to resolve system Python interpreter
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] 
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #3 go.chromium.org/luci/vpython/venv/venv.go:150 - venv.With()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241]   reason: failed to initialize empty probe environment
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] 
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #4 go.chromium.org/luci/vpython/run.go:62 - vpython.Run()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #5 go.chromium.org/luci/vpython/application/application.go:320 - application.(*application).mainImpl()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #6 go.chromium.org/luci/vpython/application/application.go:408 - application.(*Config).Main.func1()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #7 go.chromium.org/luci/vpython/application/support.go:46 - application.run()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #8 go.chromium.org/luci/vpython/application/application.go:407 - application.(*Config).Main()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #9 vpython/main.go:106 - main.mainImpl()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #10 vpython/main.go:112 - main.main()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #11 runtime/proc.go:204 - runtime.main()
[E2020-10-13T10:59:06.801792Z 16644 0 annotate.go:241] #12 runtime/asm_amd64.s:1374 - runtime.goexit()
```
> Do you know if the auto update situation on Windows was fixed?

No, frankly I don't know. I just figured it would be time to try again.
Actually: Searching the error message points to this issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1077384 Unfortunately, that's describing the exact same problem and refers to [the duplicate ticket](https://bugs.chromium.org/p/chromium/issues/detail?id=1067590) that is discussing the bootstrapping situation on Windows. Unfortunately, it's still open. :-(

I guess, we're stuck on the old version for now.

Resolving patch:
diff --git a/recipes/depot_tools/all/conanfile.py b/recipes/depot_tools/all/conanfile.py
--- a/recipes/depot_tools/all/conanfile.py
+++ b/recipes/depot_tools/all/conanfile.py
@@ -13,6 +13,8 @@ class DepotToolsConan(ConanFile):
     no_copy_source = True
     short_paths = True
     settings = "os_build"
+    exports_sources = ["patches/**"]
+
 
     @property
     def _source_subfolder(self):
@@ -40,6 +42,9 @@ def source(self):
         tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder)
         self._dereference_symlinks()
 
+        for patch in self.conan_data.get("patches", {}).get(self.version, []):
+            tools.patch(**patch)
+
     def package(self):
         self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder)
         self.copy(pattern="*", dst="bin", src=self._source_subfolder)


Test patch: