sb/track: Only output unreferenced configs with the option

This commit is contained in:
Chris Johns 2020-08-12 13:17:48 +10:00
parent a863b15fdb
commit dc989037e4

View File

@ -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,9 +191,6 @@ 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)),
@ -219,7 +216,7 @@ def run(args = sys.argv):
''] + \
configs + \
['']
if len(not_used_configs) > 0:
if argopts.not_referenced and len(not_used_configs) > 0:
output += ['Not referenced (%d): ' % (len(not_used_configs)),
''] + \
not_used_configs