summaryrefslogtreecommitdiffstats
path: root/scripts/verify-bashisms
diff options
context:
space:
mode:
authorSaul Wold <Saul.Wold@windriver.com>2022-03-09 09:40:52 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-10 08:00:28 +0000
commitd9e500f83d0223925ca2595c77c8fb45eab10f7c (patch)
tree5b8fc1787ced86daebd7a7e26dd3bd69f9d5551b /scripts/verify-bashisms
parent8827a3ed80ec8f0adcf4b778f88cb8f9f051262b (diff)
downloadpoky-d9e500f83d0223925ca2595c77c8fb45eab10f7c.tar.gz
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>
Diffstat (limited to 'scripts/verify-bashisms')
-rwxr-xr-xscripts/verify-bashisms10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/verify-bashisms b/scripts/verify-bashisms
index 14d8c298e9..ec2374f183 100755
--- a/scripts/verify-bashisms
+++ b/scripts/verify-bashisms
@@ -5,7 +5,7 @@
5 5
6import sys, os, subprocess, re, shutil 6import sys, os, subprocess, re, shutil
7 7
8whitelist = ( 8allowed = (
9 # type is supported by dash 9 # type is supported by dash
10 'if type systemctl >/dev/null 2>/dev/null; then', 10 'if type systemctl >/dev/null 2>/dev/null; then',
11 'if type systemd-tmpfiles >/dev/null 2>/dev/null; then', 11 'if type systemd-tmpfiles >/dev/null 2>/dev/null; then',
@@ -19,8 +19,8 @@ whitelist = (
19 '. $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE' 19 '. $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE'
20 ) 20 )
21 21
22def is_whitelisted(s): 22def is_allowed(s):
23 for w in whitelist: 23 for w in allowed:
24 if w in s: 24 if w in s:
25 return True 25 return True
26 return False 26 return False
@@ -49,7 +49,7 @@ def process(filename, function, lineno, script):
49 output = e.output.replace(fn.name, function) 49 output = e.output.replace(fn.name, function)
50 if not output or not output.startswith('possible bashism'): 50 if not output or not output.startswith('possible bashism'):
51 # Probably starts with or contains only warnings. Dump verbatim 51 # Probably starts with or contains only warnings. Dump verbatim
52 # with one space indention. Can't do the splitting and whitelist 52 # with one space indention. Can't do the splitting and allowed
53 # checking below. 53 # checking below.
54 return '\n'.join([filename, 54 return '\n'.join([filename,
55 ' Unexpected output from checkbashisms.pl'] + 55 ' Unexpected output from checkbashisms.pl'] +
@@ -65,7 +65,7 @@ def process(filename, function, lineno, script):
65 # ... 65 # ...
66 # ... 66 # ...
67 result = [] 67 result = []
68 # Check the results against the whitelist 68 # Check the results against the allowed list
69 for message, source in zip(output[0::2], output[1::2]): 69 for message, source in zip(output[0::2], output[1::2]):
70 if not is_whitelisted(source): 70 if not is_whitelisted(source):
71 if lineno is not None: 71 if lineno is not None: