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:
Jan Kiszka
2017-07-17 22:38:07 +02:00
committed by Daniel Wagner
parent ef0ef7c60c
commit c9326cc1ed
2 changed files with 5 additions and 4 deletions

View File

@@ -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