mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb/track: Add a command to track build sets.
- Process a build set for a range of hosts and output a dependency tree, the used build set and configuration files. - Output the configuration files that are no referenced Closes #4036
This commit is contained in:
@@ -635,6 +635,10 @@ class build:
|
||||
return 0
|
||||
return package.get_size('installed')
|
||||
|
||||
def includes(self):
|
||||
if self.config:
|
||||
return self.config.includes()
|
||||
|
||||
def get_configs(opts):
|
||||
|
||||
def _scan(_path, ext):
|
||||
@@ -648,10 +652,17 @@ def get_configs(opts):
|
||||
return configs
|
||||
|
||||
configs = { 'paths': [], 'files': [] }
|
||||
for cp in opts.defaults.expand('%{_configdir}').split(':'):
|
||||
paths = opts.defaults.expand('%{_configdir}').split(':')
|
||||
root = path.host(os.path.commonprefix(paths))
|
||||
configs['root'] = root
|
||||
configs['localpaths'] = [lp[len(root):] for lp in paths]
|
||||
for cp in paths:
|
||||
hcp = path.host(path.abspath(cp))
|
||||
configs['paths'] += [hcp]
|
||||
configs['files'] += _scan(hcp, ['.cfg', '.bset'])
|
||||
hpconfigs = sorted(set(_scan(hcp, ['.cfg', '.bset'])))
|
||||
hcplocal = hcp[len(root):]
|
||||
configs[hcplocal] = [path.join(hcplocal, c) for c in hpconfigs]
|
||||
configs['files'] += hpconfigs
|
||||
configs['files'] = sorted(set(configs['files']))
|
||||
return configs
|
||||
|
||||
|
Reference in New Issue
Block a user