summaryrefslogtreecommitdiff
path: root/buildstream/_frontend
diff options
context:
space:
mode:
authorTom Pollard <tom.pollard@codethink.co.uk>2018-11-05 13:16:53 +0000
committerJürg Billeter <j@bitron.ch>2018-11-17 13:07:59 +0000
commit199bfff16160cd0c7c0fe56af3723656f6148068 (patch)
tree3e0107a4865292edf25e4bedfec6591f48e06b22 /buildstream/_frontend
parentb5b79056acdc0ad883e04d17de5948fb4a9d88e6 (diff)
downloadbuildstream-199bfff16160cd0c7c0fe56af3723656f6148068.tar.gz
Add cli main and user config option for 'pull-buildtrees' context.
_context.py: Add pull_buildtrees global user context, the default of which is set to False via the addition of pull-buildtrees to userconfig.yaml cache group. _frontend/app.py & cli.py: Add --pull-buildtrees as a bst main option, which when passed will override the default or user defined context for pull_buildtrees. tests/completions/completions.py: Update for the added flag.
Diffstat (limited to 'buildstream/_frontend')
-rw-r--r--buildstream/_frontend/app.py3
-rw-r--r--buildstream/_frontend/cli.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/buildstream/_frontend/app.py b/buildstream/_frontend/app.py
index 6b292a44a..b42b94bc1 100644
--- a/buildstream/_frontend/app.py
+++ b/buildstream/_frontend/app.py
@@ -182,7 +182,8 @@ class App():
'fetchers': 'sched_fetchers',
'builders': 'sched_builders',
'pushers': 'sched_pushers',
- 'network_retries': 'sched_network_retries'
+ 'network_retries': 'sched_network_retries',
+ 'pull_buildtrees': 'pull_buildtrees'
}
for cli_option, context_attr in override_map.items():
option_value = self._main_options.get(cli_option)
diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py
index 85632959f..b75bf455b 100644
--- a/buildstream/_frontend/cli.py
+++ b/buildstream/_frontend/cli.py
@@ -219,6 +219,8 @@ def print_version(ctx, param, value):
help="Specify a project option")
@click.option('--default-mirror', default=None,
help="The mirror to fetch from first, before attempting other mirrors")
+@click.option('--pull-buildtrees', is_flag=True, default=None,
+ help="Include an element's build tree when pulling remote element artifacts")
@click.pass_context
def cli(context, **kwargs):
"""Build and manipulate BuildStream projects