summaryrefslogtreecommitdiff
path: root/src/buildstream/_loader/loader.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-06-26 15:44:23 +0200
committerJürg Billeter <j@bitron.ch>2019-07-03 11:40:40 +0100
commit16d469dbee3c9667bf143ab85dfc0b80e178a099 (patch)
treed9b44730be9578b6a63957f4f59147ff31567ebe /src/buildstream/_loader/loader.py
parentec74e31667c2f84151237295e0f380deeeaf103d (diff)
downloadbuildstream-16d469dbee3c9667bf143ab85dfc0b80e178a099.tar.gz
loader.py: Check source cache for subproject fetching
If the junction source consistency is cached but the junction is not in the source cache, also use Stream.fetch_subprojects() to import sources into source cache instead of doing this implicitly in Element._stage_sources_at(). This is in preparation for buildbox-casd, which will disallow local CAS cache writes from the main process (gRPC).
Diffstat (limited to 'src/buildstream/_loader/loader.py')
-rw-r--r--src/buildstream/_loader/loader.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildstream/_loader/loader.py b/src/buildstream/_loader/loader.py
index fa3539b22..5f98b127c 100644
--- a/src/buildstream/_loader/loader.py
+++ b/src/buildstream/_loader/loader.py
@@ -622,7 +622,7 @@ class Loader():
# Handle the case where a subproject needs to be fetched
#
- if element._get_consistency() == Consistency.RESOLVED:
+ if element._get_consistency() >= Consistency.RESOLVED and not element._source_cached():
if ticker:
ticker(filename, 'Fetching subproject')
self._fetch_subprojects([element])