Make CACHE_DIR set by default in most gclient configs.

This is needed because bot_update changed from getting the cache directory from
the global path module to the gclient config.

BUG=589140

Review URL: https://codereview.chromium.org/1768893003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299143 0039d316-1c4b-4281-b951-d872f2087c98
parent baff4e1c
......@@ -126,11 +126,10 @@ class GclientApi(recipe_api.RecipeApi):
self._spec_alias = None
def get_config_defaults(self):
ret = {
'USE_MIRROR': self.use_mirror
return {
'USE_MIRROR': self.use_mirror,
'CACHE_DIR': self.m.path['git_cache'],
}
ret['CACHE_DIR'] = self.m.path['root'].join('git_cache')
return ret
def resolve_revision(self, revision):
if hasattr(revision, 'resolve'):
......
......@@ -14,7 +14,7 @@ def BaseConfig(USE_MIRROR=True, GIT_MODE=False, CACHE_DIR=None,
PATCH_PROJECT=None, BUILDSPEC_VERSION=None,
**_kwargs):
deps = '.DEPS.git' if GIT_MODE else 'DEPS'
cache_dir = str(CACHE_DIR) if GIT_MODE and CACHE_DIR else None
cache_dir = str(CACHE_DIR) if CACHE_DIR else None
return ConfigGroup(
solutions = ConfigList(
lambda: ConfigGroup(
......
......@@ -89,7 +89,7 @@
"RECIPE_PACKAGE[depot_tools]/gclient.py",
"config",
"--spec",
"cache_dir = None\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
],
"cwd": "[SLAVE_BUILD]/src/third_party",
"env": {
......
......@@ -91,7 +91,7 @@
"RECIPE_PACKAGE[depot_tools]/gclient.py",
"config",
"--spec",
"cache_dir = None\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
],
"cwd": "[SLAVE_BUILD]/src/third_party",
"env": {
......
......@@ -91,7 +91,7 @@
"RECIPE_PACKAGE[depot_tools]/gclient.py",
"config",
"--spec",
"cache_dir = None\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
],
"cwd": "[SLAVE_BUILD]/src/third_party",
"env": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment