[rtems-source-builder commit] sb/track: Only output unreferenced configs with the option

Chris Johns chrisj at rtems.org
Wed Aug 12 03:18:13 UTC 2020


Module:    rtems-source-builder
Branch:    master
Commit:    dc989037e430ceb24b9a7ffd6e514935319e0e45
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=dc989037e430ceb24b9a7ffd6e514935319e0e45

Author:    Chris Johns <chrisj at rtems.org>
Date:      Wed Aug 12 13:17:48 2020 +1000

sb/track: Only output unreferenced configs with the option

---

 source-builder/sb/track.py | 63 ++++++++++++++++++++++------------------------
 1 file changed, 30 insertions(+), 33 deletions(-)

diff --git a/source-builder/sb/track.py b/source-builder/sb/track.py
index ef4ce8b..aef25b9 100644
--- a/source-builder/sb/track.py
+++ b/source-builder/sb/track.py
@@ -134,7 +134,7 @@ def run(args = sys.argv):
         argsp.add_argument('--trace', help = 'Enable trace logging for debugging.',
                            action = 'store_true')
         argsp.add_argument('--not-referenced',
-                           help = 'Write out the list of not config files not referenced.',
+                           help = 'Write out the list of config files not referenced.',
                            action = 'store_true')
         argsp.add_argument('bsets', nargs='*', help = 'Build sets.')
 
@@ -191,38 +191,35 @@ def run(args = sys.argv):
                     if e not in bsets + configs:
                         errs += [e]
                 errors = errs
-            if argopts.not_referenced:
-                output = not_used_configs
-            else:
-                output = ['RSB Dependency Tracker',
-                          '',
-                          'Total buildsets: %d' % (len(all_bsets)),
-                          'Total configs: %d' % (len(all_configs)),
-                          '']
-                if len(errors) > 0:
-                    output += ['Errored File Set (%d):' % (len(errors)),
-                               ''] + \
-                              errors + \
-                              ['']
-                if len(configs) > 0:
-                    output += ['Include Tree(s):',
-                               ''] + \
-                               deps_tree + \
-                               ['']
-                if len(bsets) > 0:
-                    output += ['Buildsets (%d):' % (len(bsets)),
-                               ''] + \
-                               bsets + \
-                               ['']
-                if len(configs) > 0:
-                    output += ['Configurations (%d):' % (len(configs)),
-                               ''] + \
-                               configs + \
-                               ['']
-                if len(not_used_configs) > 0:
-                    output += ['Not referenced (%d): ' % (len(not_used_configs)),
-                               ''] + \
-                               not_used_configs
+            output = ['RSB Dependency Tracker',
+                      '',
+                      'Total buildsets: %d' % (len(all_bsets)),
+                      'Total configs: %d' % (len(all_configs)),
+                      '']
+            if len(errors) > 0:
+                output += ['Errored File Set (%d):' % (len(errors)),
+                           ''] + \
+                           errors + \
+                           ['']
+            if len(configs) > 0:
+                output += ['Include Tree(s):',
+                           ''] + \
+                           deps_tree + \
+                           ['']
+            if len(bsets) > 0:
+                output += ['Buildsets (%d):' % (len(bsets)),
+                           ''] + \
+                           bsets + \
+                           ['']
+            if len(configs) > 0:
+                output += ['Configurations (%d):' % (len(configs)),
+                           ''] + \
+                           configs + \
+                           ['']
+            if argopts.not_referenced and len(not_used_configs) > 0:
+                output += ['Not referenced (%d): ' % (len(not_used_configs)),
+                           ''] + \
+                           not_used_configs
             output = os.linesep.join(output)
             if argopts.output:
                 o = open(argopts.output, "w")



More information about the vc mailing list