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

Side by Side Diff: recipe_modules/gclient/config.py

Issue 1768893003: Make CACHE_DIR set by default in most gclient configs. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 9 months 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import types 5 import types
6 6
7 from recipe_engine.config import config_item_context, ConfigGroup, BadConf 7 from recipe_engine.config import config_item_context, ConfigGroup, BadConf
8 from recipe_engine.config import ConfigList, Dict, Single, Static, Set, List 8 from recipe_engine.config import ConfigList, Dict, Single, Static, Set, List
9 9
10 from . import api as gclient_api 10 from . import api as gclient_api
11 11
12 12
13 def BaseConfig(USE_MIRROR=True, GIT_MODE=False, CACHE_DIR=None, 13 def BaseConfig(USE_MIRROR=True, GIT_MODE=False, CACHE_DIR=None,
14 PATCH_PROJECT=None, BUILDSPEC_VERSION=None, 14 PATCH_PROJECT=None, BUILDSPEC_VERSION=None,
15 **_kwargs): 15 **_kwargs):
16 deps = '.DEPS.git' if GIT_MODE else 'DEPS' 16 deps = '.DEPS.git' if GIT_MODE else 'DEPS'
17 cache_dir = str(CACHE_DIR) if GIT_MODE and CACHE_DIR else None 17 cache_dir = str(CACHE_DIR) if CACHE_DIR else None
szager1 2016/03/08 02:24:43 If I'm understanding this right, this is the actua
iannucci 2016/03/08 04:09:40 It will modify it at the base of the config tree:
18 return ConfigGroup( 18 return ConfigGroup(
19 solutions = ConfigList( 19 solutions = ConfigList(
20 lambda: ConfigGroup( 20 lambda: ConfigGroup(
21 name = Single(basestring), 21 name = Single(basestring),
22 url = Single(basestring), 22 url = Single(basestring),
23 deps_file = Single(basestring, empty_val=deps, required=False, 23 deps_file = Single(basestring, empty_val=deps, required=False,
24 hidden=False), 24 hidden=False),
25 managed = Single(bool, empty_val=True, required=False, hidden=False), 25 managed = Single(bool, empty_val=True, required=False, hidden=False),
26 custom_deps = Dict(value_type=(basestring, types.NoneType)), 26 custom_deps = Dict(value_type=(basestring, types.NoneType)),
27 custom_vars = Dict(value_type=basestring), 27 custom_vars = Dict(value_type=basestring),
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 soln = c.solutions.add() 642 soln = c.solutions.add()
643 soln.name = 'gerrit-test-cq-normal' 643 soln.name = 'gerrit-test-cq-normal'
644 soln.url = 'https://chromium.googlesource.com/playground/gerrit-cq/normal.git' 644 soln.url = 'https://chromium.googlesource.com/playground/gerrit-cq/normal.git'
645 645
646 # TODO(phajdan.jr): Move to proper repo and add coverage. 646 # TODO(phajdan.jr): Move to proper repo and add coverage.
647 @config_ctx() 647 @config_ctx()
648 def valgrind(c): # pragma: no cover 648 def valgrind(c): # pragma: no cover
649 """Add Valgrind binaries to the gclient solution.""" 649 """Add Valgrind binaries to the gclient solution."""
650 c.solutions[0].custom_deps['src/third_party/valgrind'] = \ 650 c.solutions[0].custom_deps['src/third_party/valgrind'] = \
651 ChromiumGitURL(c, 'chromium', 'deps', 'valgrind', 'binaries') 651 ChromiumGitURL(c, 'chromium', 'deps', 'valgrind', 'binaries')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698