public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [OE-core][PATCH 1/2] convert-overrides.py: also convert comments without a leading whitespace
@ 2021-08-06  9:03 Chen Qi
  2021-08-06  9:03 ` [OE-core][PATCH 2/2] convert-overrides.py: skip patches Chen Qi
  2021-08-06  9:25 ` [OE-core][PATCH 1/2] convert-overrides.py: also convert comments without a leading whitespace Martin Jansa
  0 siblings, 2 replies; 6+ messages in thread
From: Chen Qi @ 2021-08-06  9:03 UTC (permalink / raw)
  To: openembedded-core

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 <Qi.Chen@windriver.com>
---
 scripts/contrib/convert-overrides.py | 6 +++---
 1 file 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
 
 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 = {
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-09  1:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-06  9:03 [OE-core][PATCH 1/2] convert-overrides.py: also convert comments without a leading whitespace Chen Qi
2021-08-06  9:03 ` [OE-core][PATCH 2/2] convert-overrides.py: skip patches Chen Qi
2021-08-06 10:58   ` Richard Purdie
2021-08-09  1:36     ` Chen Qi
2021-08-06  9:25 ` [OE-core][PATCH 1/2] convert-overrides.py: also convert comments without a leading whitespace Martin Jansa
2021-08-06  9:44   ` Chen Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox