diff --git a/docs/format-changelog.rst b/docs/format-changelog.rst index 5a6ed32..1a70a8a 100644 --- a/docs/format-changelog.rst +++ b/docs/format-changelog.rst @@ -39,3 +39,12 @@ Added ~~~~~ - ``Target`` key now allows to be a list of target names + +Version 5 +--------- + +Changed behavior +~~~~~~~~~~~~~~~~ + +- Using ``multiconfig:*`` targets adds appropriate ``BBMULTICONFIG`` entries to + the ``local.conf`` automatically. diff --git a/kas/__version__.py b/kas/__version__.py index 5dfe5a7..998ff8a 100644 --- a/kas/__version__.py +++ b/kas/__version__.py @@ -28,5 +28,5 @@ __copyright__ = 'Copyright (c) Siemens AG, 2017' __version__ = '0.14.0' # Please update docs/format-changelog.rst when changing the file version. -__file_version__ = 4 +__file_version__ = 5 __compatible_file_version__ = 1 diff --git a/kas/config.py b/kas/config.py index baaef35..6365938 100644 --- a/kas/config.py +++ b/kas/config.py @@ -269,6 +269,15 @@ class Config: return os.environ.get('KAS_DISTRO', self._config.get('distro', 'poky')) + def get_multiconfig(self): + """ + Returns the multiconfig array as bitbake string + """ + return ' '.join(set(i.split(':')[1] + for i in + self.get_bitbake_targets() + if i.startswith('multiconfig'))) + def get_gitlabci_config(self): """ Returns the GitlabCI configuration diff --git a/kas/libcmds.py b/kas/libcmds.py index 949edfb..c25385b 100644 --- a/kas/libcmds.py +++ b/kas/libcmds.py @@ -183,6 +183,8 @@ class WriteConfig(Command): fds.write(config.get_local_conf_header()) fds.write('MACHINE ?= "{}"\n'.format(config.get_machine())) fds.write('DISTRO ?= "{}"\n'.format(config.get_distro())) + fds.write('BBMULTICONFIG ?= "{}"\n'.format( + config.get_multiconfig())) _write_bblayers_conf(config) _write_local_conf(config)