diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2018-06-29 18:28:48 +0100 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2018-07-05 13:28:03 +0100 |
commit | c43e8ec14a6da61de09b66674307bba701cc05d5 (patch) | |
tree | 664e4ee0e06349833ef540ee216612cc27d8a996 | |
parent | 608515820e4a62d6ed6efd3d9c9741d7d5acbb50 (diff) | |
download | buildstream-jonathan/fix-filter.tar.gz |
Only redirect elements for workspace and track operationsjonathan/fix-filter
It was redirecting for checkout operations
-rw-r--r-- | buildstream/_pipeline.py | 5 | ||||
-rw-r--r-- | buildstream/_stream.py | 16 |
2 files changed, 16 insertions, 5 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py index 9f4504d3f..2a61a9367 100644 --- a/buildstream/_pipeline.py +++ b/buildstream/_pipeline.py @@ -44,6 +44,9 @@ class PipelineSelection(): # Select only the target elements in the associated targets NONE = 'none' + # As NONE, but do not redirect elements that are capable of it + NO_REDIRECT = 'no-redirect' + # Select elements which must be built for the associated targets to be built PLAN = 'plan' @@ -224,6 +227,8 @@ class Pipeline(): .format(t.name, new_elm.name)) if new_elm not in elements: elements.append(new_elm) + elif mode == PipelineSelection.NO_REDIRECT: + elements = targets elif mode == PipelineSelection.PLAN: elements = self.plan(targets) else: diff --git a/buildstream/_stream.py b/buildstream/_stream.py index 5013daf3b..4565a25f9 100644 --- a/buildstream/_stream.py +++ b/buildstream/_stream.py @@ -421,7 +421,9 @@ class Stream(): else: track_targets = () - elements, track_elements = self._load((target,), track_targets) + elements, track_elements = self._load((target,), track_targets, + selection=PipelineSelection.NONE, + track_selection=PipelineSelection.NONE) target = elements[0] workdir = os.path.abspath(directory) @@ -514,7 +516,9 @@ class Stream(): else: track_targets = () - elements, track_elements = self._load(targets, track_targets) + elements, track_elements = self._load(targets, track_targets, + selection=PipelineSelection.NONE, + track_selection=PipelineSelection.NONE) nonexisting = [] for element in elements: @@ -699,7 +703,9 @@ class Stream(): else: output_elements.add(e) if load_elements: - loaded_elements, _ = self._load(load_elements, ()) + loaded_elements, _ = self._load(load_elements, (), + selection=PipelineSelection.NONE, + track_selection=PipelineSelection.NONE) for e in loaded_elements: output_elements.add(e.name) @@ -792,8 +798,8 @@ class Stream(): # (list of Element): The tracking element selection # def _load(self, targets, track_targets, *, - selection=PipelineSelection.NONE, - track_selection=PipelineSelection.NONE, + selection=PipelineSelection.NO_REDIRECT, + track_selection=PipelineSelection.NO_REDIRECT, except_targets=(), track_except_targets=(), track_cross_junctions=False, |