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
|
Returns the local.conf header
|
||||||
"""
|
"""
|
||||||
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)
|
header += '# {}\n{}\n'.format(key, value)
|
||||||
return header
|
return header
|
||||||
|
|
||||||
|
@ -185,8 +185,9 @@ class WriteConfig(Command):
|
|||||||
with open(filename, 'w') as fds:
|
with open(filename, 'w') as fds:
|
||||||
fds.write(config.get_bblayers_conf_header())
|
fds.write(config.get_bblayers_conf_header())
|
||||||
fds.write('BBLAYERS ?= " \\\n ')
|
fds.write('BBLAYERS ?= " \\\n ')
|
||||||
for repo in config.get_repos():
|
fds.write(' \\\n '.join(
|
||||||
fds.write(' \\\n'.join(repo.layers + ['']))
|
sorted(layer for repo in config.get_repos()
|
||||||
|
for layer in repo.layers)))
|
||||||
fds.write('"\n')
|
fds.write('"\n')
|
||||||
|
|
||||||
def _write_local_conf(config):
|
def _write_local_conf(config):
|
||||||
|
Loading…
Reference in New Issue
Block a user