All of lore.kernel.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

* [OE-core][PATCH 2/2] convert-overrides.py: skip patches
  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 ` Chen Qi
  2021-08-06 10:58   ` Richard Purdie
  2021-08-06  9:25 ` [OE-core][PATCH 1/2] convert-overrides.py: also convert comments without a leading whitespace Martin Jansa
  1 sibling, 1 reply; 6+ messages in thread
From: Chen Qi @ 2021-08-06  9:03 UTC (permalink / raw)
  To: openembedded-core

If a line specifies a patch, skip it.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 scripts/contrib/convert-overrides.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/contrib/convert-overrides.py b/scripts/contrib/convert-overrides.py
index 4d41a4c475..387e29d66d 100755
--- a/scripts/contrib/convert-overrides.py
+++ b/scripts/contrib/convert-overrides.py
@@ -63,6 +63,7 @@ skips = skips + ["run_loaddata_poky", "determine_if_poky_env", "do_populate_poky
 skips = skips + ["get_appends_for_files", "test_doubleref_remove", "test_bitbakelayers_add_remove", "elf32_x86_64", "colour_remove", "revmap_remove"]
 skips = skips + ["test_rpm_remove", "test_bitbakelayers_add_remove", "recipe_append_file", "log_data_removed", "recipe_append", "systemd_machine_unit_append"]
 skips = skips + ["recipetool_append", "changetype_remove", "try_appendfile_wc", "test_qemux86_directdisk", "test_layer_appends", "tgz_removed"]
+skips = skips + ["file://"]
 
 imagevars = ["IMAGE_CMD", "EXTRA_IMAGECMD", "IMAGE_TYPEDEP", "CONVERSION_CMD", "COMPRESS_CMD"]
 packagevars = packagevars + imagevars
-- 
2.30.2


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

* Re: [OE-core][PATCH 1/2] convert-overrides.py: also convert comments without a leading whitespace
  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  9:25 ` Martin Jansa
  2021-08-06  9:44   ` Chen Qi
  1 sibling, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2021-08-06  9:25 UTC (permalink / raw)
  To: Chen Qi; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1763 bytes --]

Can you please bump the script version as well?

On Fri, Aug 6, 2021 at 11:03 AM Chen Qi <Qi.Chen@windriver.com> wrote:

> 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
>
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 2513 bytes --]

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

* Re: [OE-core][PATCH 1/2] convert-overrides.py: also convert comments without a leading whitespace
  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
  0 siblings, 0 replies; 6+ messages in thread
From: Chen Qi @ 2021-08-06  9:44 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2896 bytes --]

Got it. I've sent out V2.

Regards,
Qi

On 08/06/2021 05:25 PM, Martin Jansa wrote:
> Can you please bump the script version as well?
>
> On Fri, Aug 6, 2021 at 11:03 AM Chen Qi <Qi.Chen@windriver.com 
> <mailto:Qi.Chen@windriver.com>> wrote:
>
>     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
>     <mailto:Qi.Chen@windriver.com>>
>     ---
>      scripts/contrib/convert-overrides.py
>     <https://urldefense.com/v3/__http://convert-overrides.py__;%21%21AjveYdw8EvQ%21PD0spdg2c_3A47Id6ecejSLJcClzE1tewbyquzswai_YYcg_XxOQyX2l9AH3cc9f2A$>
>     | 6 +++---
>      1 file changed, 3 insertions(+), 3 deletions(-)
>
>     diff --git a/scripts/contrib/convert-overrides.py
>     <https://urldefense.com/v3/__http://convert-overrides.py__;%21%21AjveYdw8EvQ%21PD0spdg2c_3A47Id6ecejSLJcClzE1tewbyquzswai_YYcg_XxOQyX2l9AH3cc9f2A$>
>     b/scripts/contrib/convert-overrides.py
>     <https://urldefense.com/v3/__http://convert-overrides.py__;%21%21AjveYdw8EvQ%21PD0spdg2c_3A47Id6ecejSLJcClzE1tewbyquzswai_YYcg_XxOQyX2l9AH3cc9f2A$>
>     index e4a310d1d6..4d41a4c475 100755
>     --- a/scripts/contrib/convert-overrides.py
>     <https://urldefense.com/v3/__http://convert-overrides.py__;%21%21AjveYdw8EvQ%21PD0spdg2c_3A47Id6ecejSLJcClzE1tewbyquzswai_YYcg_XxOQyX2l9AH3cc9f2A$>
>     +++ b/scripts/contrib/convert-overrides.py
>     <https://urldefense.com/v3/__http://convert-overrides.py__;%21%21AjveYdw8EvQ%21PD0spdg2c_3A47Id6ecejSLJcClzE1tewbyquzswai_YYcg_XxOQyX2l9AH3cc9f2A$>
>     @@ -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
>
>
>     
>


[-- Attachment #2: Type: text/html, Size: 4620 bytes --]

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

* Re: [OE-core][PATCH 2/2] convert-overrides.py: skip patches
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2021-08-06 10:58 UTC (permalink / raw)
  To: Chen Qi, openembedded-core

On Fri, 2021-08-06 at 02:03 -0700, Chen Qi wrote:
> If a line specifies a patch, skip it.
> 
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  scripts/contrib/convert-overrides.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/contrib/convert-overrides.py b/scripts/contrib/convert-overrides.py
> index 4d41a4c475..387e29d66d 100755
> --- a/scripts/contrib/convert-overrides.py
> +++ b/scripts/contrib/convert-overrides.py
> @@ -63,6 +63,7 @@ skips = skips + ["run_loaddata_poky", "determine_if_poky_env", "do_populate_poky
>  skips = skips + ["get_appends_for_files", "test_doubleref_remove", "test_bitbakelayers_add_remove", "elf32_x86_64", "colour_remove", "revmap_remove"]
>  skips = skips + ["test_rpm_remove", "test_bitbakelayers_add_remove", "recipe_append_file", "log_data_removed", "recipe_append", "systemd_machine_unit_append"]
>  skips = skips + ["recipetool_append", "changetype_remove", "try_appendfile_wc", "test_qemux86_directdisk", "test_layer_appends", "tgz_removed"]
> +skips = skips + ["file://"]

This is never simple since this would now skip:

SRC_URI_append = " file://xxxx"

I'm not sure which issue is better/worse...

Cheers,

Richard



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

* Re: [OE-core][PATCH 2/2] convert-overrides.py: skip patches
  2021-08-06 10:58   ` Richard Purdie
@ 2021-08-09  1:36     ` Chen Qi
  0 siblings, 0 replies; 6+ messages in thread
From: Chen Qi @ 2021-08-09  1:36 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

On 08/06/2021 06:58 PM, Richard Purdie wrote:
> On Fri, 2021-08-06 at 02:03 -0700, Chen Qi wrote:
>> If a line specifies a patch, skip it.
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>>   scripts/contrib/convert-overrides.py | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/scripts/contrib/convert-overrides.py b/scripts/contrib/convert-overrides.py
>> index 4d41a4c475..387e29d66d 100755
>> --- a/scripts/contrib/convert-overrides.py
>> +++ b/scripts/contrib/convert-overrides.py
>> @@ -63,6 +63,7 @@ skips = skips + ["run_loaddata_poky", "determine_if_poky_env", "do_populate_poky
>>   skips = skips + ["get_appends_for_files", "test_doubleref_remove", "test_bitbakelayers_add_remove", "elf32_x86_64", "colour_remove", "revmap_remove"]
>>   skips = skips + ["test_rpm_remove", "test_bitbakelayers_add_remove", "recipe_append_file", "log_data_removed", "recipe_append", "systemd_machine_unit_append"]
>>   skips = skips + ["recipetool_append", "changetype_remove", "try_appendfile_wc", "test_qemux86_directdisk", "test_layer_appends", "tgz_removed"]
>> +skips = skips + ["file://"]
> This is never simple since this would now skip:
>
> SRC_URI_append = " file://xxxx"

I didn't realize such case. Thanks for pointing it out.

Regards,
Qi

>
> I'm not sure which issue is better/worse...
>
> Cheers,
>
> Richard
>
>
>


^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.