You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ro...@apache.org on 2020/12/29 13:42:43 UTC

[buildstream] 03/05: Add `bst build --track-except`

This is an automated email from the ASF dual-hosted git repository.

root pushed a commit to branch tracking-changes
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 75133339fa327529e10d16dc3191d9eaa4209651
Author: Tristan Maat <tr...@codethink.co.uk>
AuthorDate: Tue Oct 24 16:47:35 2017 +0100

    Add `bst build --track-except`
---
 buildstream/_frontend/main.py | 10 +++++++---
 buildstream/_pipeline.py      |  2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py
index d694d8c..8c47539 100644
--- a/buildstream/_frontend/main.py
+++ b/buildstream/_frontend/main.py
@@ -100,7 +100,8 @@ def override_completions(cmd_param, ctx, args, incomplete):
        (cmd_param.name == 'elements' or
         cmd_param.name == 'element' or
         cmd_param.name == 'except_' or
-        cmd_param.opts == ['--track']):
+        cmd_param.opts == ['--track'] or
+        cmd_param.opts == ['--track-except']):
         return complete_target(ctx, args, incomplete)
 
     raise CompleteUnhandled()
@@ -198,15 +199,18 @@ def cli(context, **kwargs):
               type=click.Path(dir_okay=False, readable=True),
               help="Specify elements to track during the build. Can be used "
                    "repeatedly to specify multiple elements")
+@click.option('--track-except', multiple=True,
+              type=click.Path(dir_okay=False, readable=True),
+              help="Except certain dependencies from tracking")
 @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):
+def build(app, elements, all, track, track_save, track_except):
     """Build elements in a pipeline"""
 
-    app.initialize(elements, rewritable=track_save)
+    app.initialize(elements, except_=track_except, rewritable=track_save)
     app.pipeline.initialize(use_remote_cache=True, inconsistent=track)
     app.print_heading()
     try:
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py
index bd8fbb2..08684d4 100644
--- a/buildstream/_pipeline.py
+++ b/buildstream/_pipeline.py
@@ -437,7 +437,7 @@ class Pipeline():
         if build_all:
             plan = self.dependencies(Scope.ALL)
         else:
-            plan = self.plan()
+            plan = self.plan(except_=False)
 
         # We want to start the build queue with any elements that are
         # not being tracked first