From: Chen Qi Date: Fri, 6 Aug 2021 09:03:31 +0000 (-0700) Subject: convert-overrides.py: also convert comments without a leading whitespace X-Git-Tag: uninative-3.3~47 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=1994e3844c1aa6b595c0c18040e4f8240fa04438;p=openembedded-core.git 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. Signed-off-by: Chen Qi Signed-off-by: Richard Purdie --- 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 = {