Write deterministic local.conf and bblayers.conf
Sort the header sections by their keys and the layers by their names. This will re-enable writing deterministic config files, and bitbake can use its cache again, accelerating rebuild startup times a lot. While at it, indent the layers in bblayers.conf nicely. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
ef0ef7c60c
commit
c9326cc1ed
@ -154,7 +154,7 @@ class Config:
|
||||
Returns the local.conf header
|
||||
"""
|
||||
header = ''
|
||||
for key, value in self._config.get(header_name, {}).items():
|
||||
for key, value in sorted(self._config.get(header_name, {}).items()):
|
||||
header += '# {}\n{}\n'.format(key, value)
|
||||
return header
|
||||
|
||||
|
@ -184,9 +184,10 @@ class WriteConfig(Command):
|
||||
filename = config.build_dir + '/conf/bblayers.conf'
|
||||
with open(filename, 'w') as fds:
|
||||
fds.write(config.get_bblayers_conf_header())
|
||||
fds.write('BBLAYERS ?= " \\\n')
|
||||
for repo in config.get_repos():
|
||||
fds.write(' \\\n'.join(repo.layers + ['']))
|
||||
fds.write('BBLAYERS ?= " \\\n ')
|
||||
fds.write(' \\\n '.join(
|
||||
sorted(layer for repo in config.get_repos()
|
||||
for layer in repo.layers)))
|
||||
fds.write('"\n')
|
||||
|
||||
def _write_local_conf(config):
|
||||
|
Loading…
Reference in New Issue
Block a user