summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-10-29 18:15:52 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-10-29 18:15:52 +0900
commit5c2ef6d076921bc0121e61efaa7a719c34ea1912 (patch)
tree37a689d826654b269264b799669d12cb0bc7070e
parentdcf0d7279c3d2a0fa15560eef34eca4babb92437 (diff)
downloadbuildstream-5c2ef6d076921bc0121e61efaa7a719c34ea1912.tar.gz
_pipeline.py: Make fetching of remote refs optional
Default is not to fetch them, we only need them in a few cases.
-rw-r--r--buildstream/_pipeline.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py
index 0c4283c72..eecb88f6a 100644
--- a/buildstream/_pipeline.py
+++ b/buildstream/_pipeline.py
@@ -105,6 +105,7 @@ class Planner():
# current source refs will not be the effective refs.
# rewritable (bool): Whether the loaded files should be rewritable
# this is a bit more expensive due to deep copies
+# fetch_remote_refs (bool): Whether to attempt to check remote artifact server for new refs
# load_ticker (callable): A function which will be called for each loaded element
# resolve_ticker (callable): A function which will be called for each resolved element
# cache_ticker (callable): A function which will be called for each element
@@ -126,6 +127,7 @@ class Pipeline():
def __init__(self, context, project, target,
inconsistent=False,
rewritable=False,
+ fetch_remote_refs=False,
load_ticker=None,
resolve_ticker=None,
remote_ticker=None,
@@ -173,7 +175,7 @@ class Pipeline():
self.project._set_workspace(element, source, workspace)
- if self.artifacts.can_fetch():
+ if fetch_remote_refs and self.artifacts.can_fetch():
try:
if remote_ticker:
remote_ticker(self.artifacts.artifact_pull)