mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
bitbake: bitbake: Rename environment filtering variables
In line with the inclusive language migration defined at: https://wiki.yoctoproject.org/wiki/Inclusive_language rename: BB_ENV_WHITELIST -> BB_ENV_PASSTHROUGH BB_ENV_EXTRAWHITE -> BB_ENV_PASSTHROUGH_ADDITIONS (Bitbake rev: fe60627839d4280cf0117ed1afbfccdff1181b6a) (Bitbake rev: 87104b6a167188921da157c7dba45938849fb22a) Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8a16bf5321
commit
8e5a8a2b53
@@ -34,6 +34,8 @@ __whitespace_split__ = re.compile(r'(\s)')
|
||||
__override_regexp__ = re.compile(r'[a-z0-9]+')
|
||||
|
||||
bitbake_renamed_vars = {
|
||||
"BB_ENV_WHITELIST": "BB_ENV_PASSTHROUGH",
|
||||
"BB_ENV_EXTRAWHITE": "BB_ENV_PASSTHROUGH_ADDITIONS",
|
||||
"BB_HASHBASE_WHITELIST": "BB_BASEHASH_IGNORE_VARS",
|
||||
"BB_HASHTASK_WHITELIST": "BB_TASKHASH_IGNORE_TASKS",
|
||||
}
|
||||
|
||||
@@ -29,14 +29,14 @@ class RunQueueTests(unittest.TestCase):
|
||||
def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=None, cleanup=False):
|
||||
env = os.environ.copy()
|
||||
env["BBPATH"] = os.path.realpath(os.path.join(os.path.dirname(__file__), "runqueue-tests"))
|
||||
env["BB_ENV_EXTRAWHITE"] = "SSTATEVALID SLOWTASKS TOPDIR"
|
||||
env["BB_ENV_PASSTHROUGH_ADDITIONS"] = "SSTATEVALID SLOWTASKS TOPDIR"
|
||||
env["SSTATEVALID"] = sstatevalid
|
||||
env["SLOWTASKS"] = slowtasks
|
||||
env["TOPDIR"] = builddir
|
||||
if extraenv:
|
||||
for k in extraenv:
|
||||
env[k] = extraenv[k]
|
||||
env["BB_ENV_EXTRAWHITE"] = env["BB_ENV_EXTRAWHITE"] + " " + k
|
||||
env["BB_ENV_PASSTHROUGH_ADDITIONS"] = env["BB_ENV_PASSTHROUGH_ADDITIONS"] + " " + k
|
||||
try:
|
||||
output = subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT,universal_newlines=True, cwd=builddir)
|
||||
print(output)
|
||||
|
||||
+10
-10
@@ -589,8 +589,8 @@ def preserved_envvars():
|
||||
v = [
|
||||
'BBPATH',
|
||||
'BB_PRESERVE_ENV',
|
||||
'BB_ENV_WHITELIST',
|
||||
'BB_ENV_EXTRAWHITE',
|
||||
'BB_ENV_PASSTHROUGH',
|
||||
'BB_ENV_PASSTHROUGH_ADDITIONS',
|
||||
]
|
||||
return v + preserved_envvars_exported()
|
||||
|
||||
@@ -621,21 +621,21 @@ def filter_environment(good_vars):
|
||||
|
||||
def approved_variables():
|
||||
"""
|
||||
Determine and return the list of whitelisted variables which are approved
|
||||
Determine and return the list of variables which are approved
|
||||
to remain in the environment.
|
||||
"""
|
||||
if 'BB_PRESERVE_ENV' in os.environ:
|
||||
return os.environ.keys()
|
||||
approved = []
|
||||
if 'BB_ENV_WHITELIST' in os.environ:
|
||||
approved = os.environ['BB_ENV_WHITELIST'].split()
|
||||
approved.extend(['BB_ENV_WHITELIST'])
|
||||
if 'BB_ENV_PASSTHROUGH' in os.environ:
|
||||
approved = os.environ['BB_ENV_PASSTHROUGH'].split()
|
||||
approved.extend(['BB_ENV_PASSTHROUGH'])
|
||||
else:
|
||||
approved = preserved_envvars()
|
||||
if 'BB_ENV_EXTRAWHITE' in os.environ:
|
||||
approved.extend(os.environ['BB_ENV_EXTRAWHITE'].split())
|
||||
if 'BB_ENV_EXTRAWHITE' not in approved:
|
||||
approved.extend(['BB_ENV_EXTRAWHITE'])
|
||||
if 'BB_ENV_PASSTHROUGH_ADDITIONS' in os.environ:
|
||||
approved.extend(os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'].split())
|
||||
if 'BB_ENV_PASSTHROUGH_ADDITIONS' not in approved:
|
||||
approved.extend(['BB_ENV_PASSTHROUGH_ADDITIONS'])
|
||||
return approved
|
||||
|
||||
def clean_environment():
|
||||
|
||||
Reference in New Issue
Block a user