add conditional environment variables
Until now all environment variables in the kas config's env section require a default value. In some cases we want to rely on the weak assignment of bitbake instead of relying on the default value of the variable in the kas config. This means if we assign the 'None' value or nothing to the variable in the kas config then it is only added to BB_ENV_EXTRAWHITE or BB_ENV_PASSTHROUGH_ADDITIONS without setting it as environment variable. Signed-off-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com> [Jan: fixed overlong line] Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
committed by
Jan Kiszka
parent
102c4667d1
commit
c38517df83
@@ -28,5 +28,5 @@ __copyright__ = 'Copyright (c) Siemens AG, 2017-2020'
|
||||
__version__ = '3.1'
|
||||
|
||||
# Please update docs/format-changelog.rst when changing the file version.
|
||||
__file_version__ = 12
|
||||
__file_version__ = 13
|
||||
__compatible_file_version__ = 1
|
||||
|
@@ -275,6 +275,9 @@ def get_build_environ(build_system):
|
||||
if env_var in os.environ:
|
||||
env[env_var] = os.environ[env_var]
|
||||
|
||||
# filter out 'None' values
|
||||
env = {k: v for (k, v) in env.items() if v is not None}
|
||||
|
||||
return env
|
||||
|
||||
|
||||
|
@@ -94,7 +94,7 @@
|
||||
"env": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
"type": ["string", "null"]
|
||||
}
|
||||
},
|
||||
"target": {
|
||||
|
Reference in New Issue
Block a user