diff options
author | Ryan Roberts <ryan.roberts@arm.com> | 2023-04-06 16:51:47 +0100 |
---|---|---|
committer | Ryan Roberts <ryan.roberts@arm.com> | 2023-04-19 14:48:58 +0100 |
commit | 088f571e5aecccffc04a07e2f8849e9ee39e3249 (patch) | |
tree | f1b99bad2958d6a32a4c598c9d9bdbe74068c2da /shrinkwrap/utils/config.py | |
parent | 4f56d55200d1e20216ad9b79d92b4503c7aef0dc (diff) |
build, buildall, process: Handle btvars overrides
Enable passing btvars overrides to build and process, using similar
notation as for rtvars (--btvar <key>=<value>). For buildall, they are
passed in the configs.yaml.
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Diffstat (limited to 'shrinkwrap/utils/config.py')
-rw-r--r-- | shrinkwrap/utils/config.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/shrinkwrap/utils/config.py b/shrinkwrap/utils/config.py index 31f5232..0de5ff3 100644 --- a/shrinkwrap/utils/config.py +++ b/shrinkwrap/utils/config.py @@ -573,9 +573,13 @@ def resolveb(config, btvars={}, clivars={}): final_btvars = config['buildex']['btvars'] for k, v in final_btvars.items(): - if v['value'] is None: - raise Exception(f'{k} build-time variable not ' \ - 'set by user and no default available.') + if btvars is not None: + if k in btvars: + v['value'] = btvars[k] + if v['value'] is None: + raise Exception(f'{k} build-time variable ' \ + 'not set by user and no ' \ + 'default available.') if v['type'] == 'path' and \ v['value'] and \ |