You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/10/28 06:53:24 UTC

[buildstream] branch tristan/fix-double-pull created (now 9f2144f)

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

tvb pushed a change to branch tristan/fix-double-pull
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at 9f2144f  _stream.py: Fix double pull scheduling on the same element in `bst shell`

This branch includes the following new commits:

     new 9f2144f  _stream.py: Fix double pull scheduling on the same element in `bst shell`

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[buildstream] 01/01: _stream.py: Fix double pull scheduling on the same element in `bst shell`

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/fix-double-pull
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 9f2144f397dddec7eec212de2fd7d0abf2b046ac
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Thu Oct 28 15:51:45 2021 +0900

    _stream.py: Fix double pull scheduling on the same element in `bst shell`
    
    When running `bst shell --build` we need to add the toplevel element to
    the dependency list for the `pull` invocation, but this is not needed
    when running without the `--build` option.
---
 src/buildstream/_stream.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index ca4a098..f8455c5 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -295,10 +295,14 @@ class Stream:
             element = self.targets[0]
             element._set_required(scope)
 
+            if scope == _Scope.BUILD:
+                pull_elements = [element] + elements
+            else:
+                pull_elements = elements
+
             # Check whether the required elements are cached, and then
             # try to pull them if they are not already cached.
             #
-            pull_elements = [element] + elements
             self.query_cache(pull_elements)
             self._pull_missing_artifacts(pull_elements)