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

akitouni pushed a commit to branch abderrahim/shell-pull-buildtrees
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 9a9c454f4646bc0cdbb2b15764096d731993040b
Author: Abderrahim Kitouni <[email protected]>
AuthorDate: Tue Dec 5 07:29:57 2023 +0100

    Fix pulling buildtrees in bst shell
    
    We use _PipelineSelection.NONE when using the buildtrees, which includes the
    element. But then, we also add the element once more, and end up with two
    jobs running at once and (sometimes) failing to link the artifacts into 
place
    
    This fixes test_shell_pull_cached_buildtree[pull-without-buildtree] failing
    randomly
---
 src/buildstream/_stream.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index 86ca04c63..159436914 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -308,7 +308,7 @@ class Stream:
             element = self.targets[0]
             element._set_required(scope)
 
-            if scope == _Scope.BUILD:
+            if scope == _Scope.BUILD and not usebuildtree:
                 pull_elements = [element] + elements
             else:
                 pull_elements = elements

Reply via email to