summaryrefslogtreecommitdiff
path: root/distbuild
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-04-16 13:05:39 (GMT)
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-04-16 13:05:39 (GMT)
commit1898a9de4bc78a909e6dcec8599f30d75f932b47 (patch)
tree7753c0b561045efb899bf00293901db6709fbc21 /distbuild
parent922d3c154e7e8e17b1e0d40e18a675f4862456ab (diff)
downloadmorph-1898a9de4bc78a909e6dcec8599f30d75f932b47.tar.gz
Add flag for debugging state of build graph
Most of the time knowing the state of the build graph isn't that useful for debugging distbuild, but it may be useful in some situations.
Diffstat (limited to 'distbuild')
-rw-r--r--distbuild/build_controller.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/distbuild/build_controller.py b/distbuild/build_controller.py
index 58f0f42..da9e97c 100644
--- a/distbuild/build_controller.py
+++ b/distbuild/build_controller.py
@@ -165,6 +165,7 @@ class BuildController(distbuild.StateMachine):
self._morph_instance = morph_instance
self._helper_id = None
self.debug_transitions = False
+ self.debug_graph_state = False
def __repr__(self):
return '<BuildController at 0x%x, request-id %s>' % (id(self),
@@ -394,14 +395,15 @@ class BuildController(distbuild.StateMachine):
return
logging.debug('Queuing more worker-builds to run')
- logging.debug('Current state of build graph nodes:')
- for a in map_build_graph(self._artifact, lambda a: a):
- logging.debug(' %s state is %s' % (a.name, a.state))
- if a.state != BUILT:
- for dep in a.dependencies:
- logging.debug(
- ' depends on %s which is %s' %
- (dep.name, dep.state))
+ if self.debug_graph_state:
+ logging.debug('Current state of build graph nodes:')
+ for a in map_build_graph(self._artifact, lambda a: a):
+ logging.debug(' %s state is %s' % (a.name, a.state))
+ if a.state != BUILT:
+ for dep in a.dependencies:
+ logging.debug(
+ ' depends on %s which is %s' %
+ (dep.name, dep.state))
while True:
ready = self._find_artifacts_that_are_ready_to_build()