| Index: scripts/slave/recipe_api.py
|
| diff --git a/scripts/slave/recipe_api.py b/scripts/slave/recipe_api.py
|
| index 06d2cfac0ae5afd13036426a5ff46546bac5a643..ee74029dfa1306f0a68be306c3db80b7ed9de4a2 100644
|
| --- a/scripts/slave/recipe_api.py
|
| +++ b/scripts/slave/recipe_api.py
|
| @@ -44,7 +44,7 @@ class RecipeApi(object):
|
| """Returns a 'config blob' for the current API."""
|
| return self.make_config_params(config_name, optional, **CONFIG_VARS)[0]
|
|
|
| - def make_config_params(self, config_name=None, optional=False, **CONFIG_VARS):
|
| + def make_config_params(self, config_name, optional=False, **CONFIG_VARS):
|
| """Returns a 'config blob' for the current API, and the computed params
|
| for all dependent configurations.
|
|
|
| @@ -85,17 +85,20 @@ class RecipeApi(object):
|
| else:
|
| raise # TODO(iannucci): raise a better exception.
|
|
|
| - def set_config(self, config_name, optional=False, **CONFIG_VARS):
|
| + def set_config(self, config_name=None, optional=False, include_deps=True,
|
| + **CONFIG_VARS):
|
| """Sets the modules and its dependencies to the named configuration."""
|
| assert self._module
|
| config, params = self.make_config_params(config_name, optional,
|
| **CONFIG_VARS)
|
| if config:
|
| self.c = config
|
| - # TODO(iannucci): This is 'inefficient', since if a dep comes up multiple
|
| - # times in this recursion, it will get set_config()'d multiple times
|
| - for dep in self._module.DEPS:
|
| - getattr(self.m, dep).set_config(config_name, optional=True, **params)
|
| +
|
| + if include_deps:
|
| + # TODO(iannucci): This is 'inefficient', since if a dep comes up multiple
|
| + # times in this recursion, it will get set_config()'d multiple times
|
| + for dep in self._module.DEPS:
|
| + getattr(self.m, dep).set_config(config_name, optional=True, **params)
|
|
|
| def apply_config(self, config_name, config_object=None):
|
| """Apply a named configuration to the provided config object or self."""
|
|
|