summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Maat <tristan.maat@codethink.co.uk>2017-12-07 11:40:59 +0000
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-12-13 12:36:41 -0500
commit0e933ccc215ab8bc2030fc137ea80337fba180cc (patch)
tree201f7eee9949480799e32b0dd640756c8301de0f
parent0b36bba5570d4f541b2470578096070b19e3058e (diff)
downloadbuildstream-0e933ccc215ab8bc2030fc137ea80337fba180cc.tar.gz
main.py: Add `bst build --track-all`
-rw-r--r--buildstream/_frontend/main.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py
index ef908e645..564eabfef 100644
--- a/buildstream/_frontend/main.py
+++ b/buildstream/_frontend/main.py
@@ -202,14 +202,19 @@ def cli(context, **kwargs):
@click.option('--track-except', multiple=True,
type=click.Path(dir_okay=False, readable=True),
help="Except certain dependencies from tracking")
+@click.option('--track-all', default=False, is_flag=True,
+ help="Track all elements in the build pipeline before building")
@click.option('--track-save', default=False, is_flag=True,
help="Write out the tracked references to their element files")
@click.argument('elements', nargs=-1,
type=click.Path(dir_okay=False, readable=True))
@click.pass_obj
-def build(app, elements, all, track, track_save, track_except):
+def build(app, elements, all, track, track_save, track_all, track_except):
"""Build elements in a pipeline"""
+ if track_all:
+ track = elements
+
app.initialize(elements, except_=track_except, rewritable=track_save)
app.pipeline.initialize(use_remote_cache=True, inconsistent=track)
app.print_heading()