From 9a9c454f4646bc0cdbb2b15764096d731993040b Mon Sep 17 00:00:00 2001 From: Abderrahim Kitouni Date: Tue, 5 Dec 2023 07:29:57 +0100 Subject: [PATCH] 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 @@ def shell( 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