more consistent build and pull messages
authorTimo Savola <tsavola@movial.fi>
Fri, 4 Apr 2008 14:50:31 +0000 (17:50 +0300)
committerTimo Savola <tsavola@movial.fi>
Fri, 4 Apr 2008 14:50:31 +0000 (17:50 +0300)
matrix/matrix.py

index 36ce2c83712da175c34808508dc8271b417e0191..0f396916f468591c057456cb49ca86adc6ce18e7 100644 (file)
@@ -393,10 +393,11 @@ def build_components(targets, build_jobs=1, make_jobs=1):
                                found = True
 
                                if not component_cached(c):
                                found = True
 
                                if not component_cached(c):
-                                       print 'Starting to build', c.name
+                                       print 'Building', c.name
                                        start_job(c, jobs, make_jobs)
                                        start_job(c, jobs, make_jobs)
-                               else:
-                                       print c.name, 'found from cache'
+                               elif config.debug:
+                                       print 'Component', c.name, \
+                                             'found from cache'
                                        c.active_state = 'built'
 
                if not found and not jobs:
                                        c.active_state = 'built'
 
                if not found and not jobs:
@@ -410,13 +411,14 @@ def build_components(targets, build_jobs=1, make_jobs=1):
 def component_buildable(c):
        if c.active_state:
                if config.debug:
 def component_buildable(c):
        if c.active_state:
                if config.debug:
-                       print c.name, 'is in state:', c.active_state
+                       print 'Component', c.name, 'is in state:', c.active_state
                return False
 
        for dep in c.active_depends:
                if config.components[dep.name].active_state != 'built':
                        if config.debug:
                return False
 
        for dep in c.active_depends:
                if config.components[dep.name].active_state != 'built':
                        if config.debug:
-                               print c.name, 'depends on unbuilt', dep.name
+                               print 'Component', c.name, \
+                                     'depends on unbuilt', dep.name
                        return False
 
        return True
                        return False
 
        return True
@@ -581,11 +583,13 @@ def pull_components(targets):
                targets = config.components.keys()
 
        for name in targets:
                targets = config.components.keys()
 
        for name in targets:
-               print 'Pulling component:', name
-
                c = config.components[name]
                c = config.components[name]
-               git.pull(c.repo.path)
-               git.pull(c.meta.path)
+               pull_repository(c.repo)
+               pull_repository(c.meta)
+
+def pull_repository(repo):
+       print 'Pulling', repo.path
+       git.pull(repo.path)
 
 def source_dist_components(targets):
        if not targets:
 
 def source_dist_components(targets):
        if not targets: