mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
@@ -69,15 +69,15 @@ packagevars = packagevars + imagevars
|
|||||||
|
|
||||||
vars_re = {}
|
vars_re = {}
|
||||||
for exp in vars:
|
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 = {}
|
shortvars_re = {}
|
||||||
for exp in shortvars:
|
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 = {}
|
package_re = {}
|
||||||
for exp in packagevars:
|
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
|
# Other substitutions to make
|
||||||
subs = {
|
subs = {
|
||||||
|
|||||||
Reference in New Issue
Block a user