mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 18:32:13 +02:00
meta/scripts: Improve internal variable naming
Update internal variable names to improve the terms used. (From OE-Core rev: f408068e5d7998ae165f3002e51bc54b380b8099) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8827a3ed80
commit
d9e500f83d
@@ -5,7 +5,7 @@
|
||||
|
||||
import sys, os, subprocess, re, shutil
|
||||
|
||||
whitelist = (
|
||||
allowed = (
|
||||
# type is supported by dash
|
||||
'if type systemctl >/dev/null 2>/dev/null; then',
|
||||
'if type systemd-tmpfiles >/dev/null 2>/dev/null; then',
|
||||
@@ -19,8 +19,8 @@ whitelist = (
|
||||
'. $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE'
|
||||
)
|
||||
|
||||
def is_whitelisted(s):
|
||||
for w in whitelist:
|
||||
def is_allowed(s):
|
||||
for w in allowed:
|
||||
if w in s:
|
||||
return True
|
||||
return False
|
||||
@@ -49,7 +49,7 @@ def process(filename, function, lineno, script):
|
||||
output = e.output.replace(fn.name, function)
|
||||
if not output or not output.startswith('possible bashism'):
|
||||
# Probably starts with or contains only warnings. Dump verbatim
|
||||
# with one space indention. Can't do the splitting and whitelist
|
||||
# with one space indention. Can't do the splitting and allowed
|
||||
# checking below.
|
||||
return '\n'.join([filename,
|
||||
' Unexpected output from checkbashisms.pl'] +
|
||||
@@ -65,7 +65,7 @@ def process(filename, function, lineno, script):
|
||||
# ...
|
||||
# ...
|
||||
result = []
|
||||
# Check the results against the whitelist
|
||||
# Check the results against the allowed list
|
||||
for message, source in zip(output[0::2], output[1::2]):
|
||||
if not is_whitelisted(source):
|
||||
if lineno is not None:
|
||||
|
||||
Reference in New Issue
Block a user