OLD | NEW |
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 slave.recipe_configs_util import config_item_context, ConfigGroup, BadConf | 7 from slave.recipe_config import config_item_context, ConfigGroup, BadConf |
8 from slave.recipe_configs_util import DictConfig, SimpleConfig, StaticConfig | 8 from slave.recipe_config import DictConfig, SimpleConfig, StaticConfig |
9 from slave.recipe_configs_util import SetConfig, ConfigList, ListConfig | 9 from slave.recipe_config import SetConfig, ConfigList, ListConfig |
10 | 10 |
11 def BaseConfig(USE_MIRROR=True, GIT_MODE=False, CACHE_DIR=None, **_kwargs): | 11 def BaseConfig(USE_MIRROR=True, GIT_MODE=False, CACHE_DIR=None, **_kwargs): |
12 deps = '.DEPS.git' if GIT_MODE else 'DEPS' | 12 deps = '.DEPS.git' if GIT_MODE else 'DEPS' |
13 cache_dir = str(CACHE_DIR) if GIT_MODE and CACHE_DIR else None | 13 cache_dir = str(CACHE_DIR) if GIT_MODE and CACHE_DIR else None |
14 return ConfigGroup( | 14 return ConfigGroup( |
15 solutions = ConfigList( | 15 solutions = ConfigList( |
16 lambda: ConfigGroup( | 16 lambda: ConfigGroup( |
17 name = SimpleConfig(basestring), | 17 name = SimpleConfig(basestring), |
18 url = SimpleConfig(basestring), | 18 url = SimpleConfig(basestring), |
19 deps_file = SimpleConfig(basestring, empty_val=deps, required=False), | 19 deps_file = SimpleConfig(basestring, empty_val=deps, required=False), |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 @config_ctx() | 190 @config_ctx() |
191 def tools_build(c): | 191 def tools_build(c): |
192 if not c.GIT_MODE: | 192 if not c.GIT_MODE: |
193 raise BadConf('tools_build only supports git') | 193 raise BadConf('tools_build only supports git') |
194 s = c.solutions.add() | 194 s = c.solutions.add() |
195 s.name = 'build' | 195 s.name = 'build' |
196 s.url = ChromiumGitURL(c, 'chromium', 'tools', 'build.git') | 196 s.url = ChromiumGitURL(c, 'chromium', 'tools', 'build.git') |
197 | 197 |
198 | 198 |
OLD | NEW |