Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: gclient.py

Issue 11368067: 'dep_os' paths override 'deps' paths. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fix a typo Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/gclient_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index 40a5e0d76b69b1848e0fc15ee83db90e40c9260d..fd4075610dbeef40cdc2b754418c1f597e332113 100644
--- a/gclient.py
+++ b/gclient.py
@@ -477,6 +477,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
self.local_target_os = local_scope['target_os']
# load os specific dependencies if defined. these dependencies may
# override or extend the values defined by the 'deps' member.
+ target_os_deps = {}
if 'deps_os' in local_scope:
for deps_os_key in self.target_os:
os_deps = local_scope['deps_os'].get(deps_os_key, {})
@@ -485,9 +486,13 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
# platform, so we collect the broadest set of dependencies
# available. We may end up with the wrong revision of something for
# our platform, but this is the best we can do.
- deps.update([x for x in os_deps.items() if not x[0] in deps])
+ target_os_deps.update(
+ [x for x in os_deps.items() if not x[0] in target_os_deps])
else:
- deps.update(os_deps)
+ target_os_deps.update(os_deps)
+
+ # deps_os overrides paths from deps
+ deps.update(target_os_deps)
# If a line is in custom_deps, but not in the solution, we want to append
# this line to the solution.
« no previous file with comments | « no previous file | tests/gclient_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698