From 62372aedfe5e04b6b0c0bc5dba7c29bd4685e83b Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Fri, 6 Aug 2021 02:03:31 -0700 Subject: 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 Signed-off-by: Richard Purdie --- scripts/contrib/convert-overrides.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') 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 vars_re = {} for exp in vars: - vars_re[exp] = (re.compile('((^|[\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp), r"\1:" + exp) + vars_re[exp] = (re.compile('((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp), r"\1:" + exp) shortvars_re = {} for exp in shortvars: - shortvars_re[exp] = (re.compile('((^|[\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp + '([\(\'"\s:])'), r"\1:" + exp + r"\3") + shortvars_re[exp] = (re.compile('((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp + '([\(\'"\s:])'), r"\1:" + exp + r"\3") package_re = {} for exp in packagevars: - package_re[exp] = (re.compile('(^|[\'"\s\-\+]+)' + exp + '_' + '([$a-z"\'\s%\[<{\\\*].)'), r"\1" + exp + r":\2") + package_re[exp] = (re.compile('(^|[#\'"\s\-\+]+)' + exp + '_' + '([$a-z"\'\s%\[<{\\\*].)'), r"\1" + exp + r":\2") # Other substitutions to make subs = { -- cgit v1.2.3-54-g00ecf