diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2021-08-06 02:03:31 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-12 06:26:15 +0100 |
commit | 62372aedfe5e04b6b0c0bc5dba7c29bd4685e83b (patch) | |
tree | d8b13f52e02c4b67d209de168100728cf5fb3d5a /scripts/contrib | |
parent | 2f743b473938e798bff7122d1be177ce8e460d8b (diff) | |
download | poky-62372aedfe5e04b6b0c0bc5dba7c29bd4685e83b.tar.gz |
convert-overrides.py: also convert comments without a leading whitespace
Currently lines like below are converted.
e.g.
# IMAGE_INSTALL_append = " A"
But lines without a leading whitespace are not converted.
e.g.
#IMAGE_INSTALL_append = " A"
We should be converting both.
(From OE-Core rev: 1994e3844c1aa6b595c0c18040e4f8240fa04438)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-x | scripts/contrib/convert-overrides.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/contrib/convert-overrides.py b/scripts/contrib/convert-overrides.py index e4a310d1d6..4d41a4c475 100755 --- a/scripts/contrib/convert-overrides.py +++ b/scripts/contrib/convert-overrides.py | |||
@@ -69,15 +69,15 @@ packagevars = packagevars + imagevars | |||
69 | 69 | ||
70 | vars_re = {} | 70 | vars_re = {} |
71 | for exp in vars: | 71 | for exp in vars: |
72 | vars_re[exp] = (re.compile('((^|[\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp), r"\1:" + exp) | 72 | vars_re[exp] = (re.compile('((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp), r"\1:" + exp) |
73 | 73 | ||
74 | shortvars_re = {} | 74 | shortvars_re = {} |
75 | for exp in shortvars: | 75 | for exp in shortvars: |
76 | shortvars_re[exp] = (re.compile('((^|[\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp + '([\(\'"\s:])'), r"\1:" + exp + r"\3") | 76 | shortvars_re[exp] = (re.compile('((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp + '([\(\'"\s:])'), r"\1:" + exp + r"\3") |
77 | 77 | ||
78 | package_re = {} | 78 | package_re = {} |
79 | for exp in packagevars: | 79 | for exp in packagevars: |
80 | package_re[exp] = (re.compile('(^|[\'"\s\-\+]+)' + exp + '_' + '([$a-z"\'\s%\[<{\\\*].)'), r"\1" + exp + r":\2") | 80 | package_re[exp] = (re.compile('(^|[#\'"\s\-\+]+)' + exp + '_' + '([$a-z"\'\s%\[<{\\\*].)'), r"\1" + exp + r":\2") |
81 | 81 | ||
82 | # Other substitutions to make | 82 | # Other substitutions to make |
83 | subs = { | 83 | subs = { |