Add "depot_tools" to DEPS.
Add "depot_tools" to DEPS, and integrate this into "find_depot_tools".
This formally establishes Chromium's dependency on the "depot_tools"
repository and ensures that Chromium's expectations are versioned
alongside "depot_tools"'s revision.
Add a hook to forcefully disable the DEPS'd "depot_tools"'s self-update
mechanism, which is enabled by default for developers, ensuring that it
will remain at the version pinned in DEPS.
Finally, update "find_depot_tools" logic to point to the new DEPS'd
"depot_tools" directly as a priority preference.
Note that other repositories which have their own versions of
"find_depot_tools" will have to have their scripts similarly updated.
BUG=chromium:727917
TEST=local
- Ran `gclient sync`, syncs and disables.
- Manually imported "find_depot_tools", successfully finds DEPS'd
version.
NOTRY=true
Change-Id: I11355ac5c55754b76327a74aa1001bfce4b332ed
Reviewed-on: https://chromium-review.googlesource.com/522802
Commit-Queue: Dirk Pranke <[email protected]>
Reviewed-by: Dirk Pranke <[email protected]>
Reviewed-by: Nodir Turakulov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#477414}
diff --git a/build/find_depot_tools.py b/build/find_depot_tools.py
index 9596d2f..b70ace4 100755
--- a/build/find_depot_tools.py
+++ b/build/find_depot_tools.py
@@ -15,6 +15,10 @@
import sys
+# Path to //src
+SRC = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
+
+
def IsRealDepotTools(path):
expanded_path = os.path.expanduser(path)
return os.path.isfile(os.path.join(expanded_path, 'gclient.py'))
@@ -22,7 +26,13 @@
def add_depot_tools_to_path():
"""Search for depot_tools and add it to sys.path."""
- # First look if depot_tools is already in PYTHONPATH.
+ # First, check if we have a DEPS'd in "depot_tools".
+ deps_depot_tools = os.path.join(SRC, 'third_party', 'depot_tools')
+ if IsRealDepotTools(deps_depot_tools):
+ sys.path.append(deps_depot_tools)
+ return deps_depot_tools
+
+ # Then look if depot_tools is already in PYTHONPATH.
for i in sys.path:
if i.rstrip(os.sep).endswith('depot_tools') and IsRealDepotTools(i):
return i