All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] opkg: Fix poor operator combination choice
@ 2021-11-04 14:02 Richard Purdie
  2021-11-04 14:35 ` [OE-core] " Mikko.Rapeli
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2021-11-04 14:02 UTC (permalink / raw)
  To: openembedded-core

Combining :append with += rarely makes sense. Improve it to use the standard
format (and tweak the implied spacing).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/opkg/opkg_0.4.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/opkg/opkg_0.4.5.bb b/meta/recipes-devtools/opkg/opkg_0.4.5.bb
index 2760fc58786..8af047a51ff 100644
--- a/meta/recipes-devtools/opkg/opkg_0.4.5.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.4.5.bb
@@ -60,7 +60,7 @@ do_install_ptest () {
 	sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
 }
 
-WARN_QA:append += "openssl-deprecation"
+WARN_QA:append = " openssl-deprecation"
 QAPKGTEST[openssl-deprecation] = "package_qa_check_openssl_deprecation"
 def package_qa_check_openssl_deprecation (package, d, messages):
     sane = True
-- 
2.32.0



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

* Re: [OE-core] [PATCH] opkg: Fix poor operator combination choice
  2021-11-04 14:02 [PATCH] opkg: Fix poor operator combination choice Richard Purdie
@ 2021-11-04 14:35 ` Mikko.Rapeli
  2021-11-04 22:05   ` Alex Stewart
  0 siblings, 1 reply; 4+ messages in thread
From: Mikko.Rapeli @ 2021-11-04 14:35 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

On Thu, Nov 04, 2021 at 02:02:57PM +0000, Richard Purdie wrote:
> Combining :append with += rarely makes sense. Improve it to use the standard
> format (and tweak the implied spacing).

Maybe I'm silly but I find :append with += safer to do than manually remembring
to add the space character.

-Mikko

> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/recipes-devtools/opkg/opkg_0.4.5.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/opkg/opkg_0.4.5.bb b/meta/recipes-devtools/opkg/opkg_0.4.5.bb
> index 2760fc58786..8af047a51ff 100644
> --- a/meta/recipes-devtools/opkg/opkg_0.4.5.bb
> +++ b/meta/recipes-devtools/opkg/opkg_0.4.5.bb
> @@ -60,7 +60,7 @@ do_install_ptest () {
>  	sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
>  }
>  
> -WARN_QA:append += "openssl-deprecation"
> +WARN_QA:append = " openssl-deprecation"
>  QAPKGTEST[openssl-deprecation] = "package_qa_check_openssl_deprecation"
>  def package_qa_check_openssl_deprecation (package, d, messages):
>      sane = True
> -- 
> 2.32.0
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#157844): https://lists.openembedded.org/g/openembedded-core/message/157844
> Mute This Topic: https://lists.openembedded.org/mt/86816265/3616751
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mikko.rapeli@bmw.de]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


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

* Re: Re: [OE-core] [PATCH] opkg: Fix poor operator combination choice
  2021-11-04 14:35 ` [OE-core] " Mikko.Rapeli
@ 2021-11-04 22:05   ` Alex Stewart
  2021-11-04 23:05     ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Stewart @ 2021-11-04 22:05 UTC (permalink / raw)
  To: Mikko Rapeli, richard.purdie; +Cc: openembedded-core


On 11/4/21 09:35, Mikko Rapeli wrote:
> On Thu, Nov 04, 2021 at 02:02:57PM +0000, Richard Purdie wrote:
>> Combining :append with += rarely makes sense. Improve it to use the standard
>> format (and tweak the implied spacing).
> Maybe I'm silly but I find :append with += safer to do than manually remembring
> to add the space character.

I tend to agree; hence why I wrote it that way in the original patch. 
But I'm not going to defend the practice in this case, so ACK from me 
either way.

I'm intending to drop this recipe warning after the opkg_0.5.0 release 
in December. So the recipe-as-written will only exist in the mainline 
for another few months.

>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>> ---
>>   meta/recipes-devtools/opkg/opkg_0.4.5.bb | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-devtools/opkg/opkg_0.4.5.bb b/meta/recipes-devtools/opkg/opkg_0.4.5.bb
>> index 2760fc58786..8af047a51ff 100644
>> --- a/meta/recipes-devtools/opkg/opkg_0.4.5.bb
>> +++ b/meta/recipes-devtools/opkg/opkg_0.4.5.bb
>> @@ -60,7 +60,7 @@ do_install_ptest () {
>>   	sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
>>   }
>>   
>> -WARN_QA:append += "openssl-deprecation"
>> +WARN_QA:append = " openssl-deprecation"
>>   QAPKGTEST[openssl-deprecation] = "package_qa_check_openssl_deprecation"
>>   def package_qa_check_openssl_deprecation (package, d, messages):
>>       sane = True
>> -- 
>> 2.32.0
>>
>

Thanks,

-- 
Alex Stewart
Software Engineer - NI Real-Time OS
NI (National Instruments)

alex.stewart@ni.com



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

* Re: Re: [OE-core] [PATCH] opkg: Fix poor operator combination choice
  2021-11-04 22:05   ` Alex Stewart
@ 2021-11-04 23:05     ` Richard Purdie
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2021-11-04 23:05 UTC (permalink / raw)
  To: Alex Stewart, Mikko Rapeli; +Cc: openembedded-core

On Thu, 2021-11-04 at 17:05 -0500, Alex Stewart wrote:
> On 11/4/21 09:35, Mikko Rapeli wrote:
> > On Thu, Nov 04, 2021 at 02:02:57PM +0000, Richard Purdie wrote:
> > > Combining :append with += rarely makes sense. Improve it to use the standard
> > > format (and tweak the implied spacing).
> > Maybe I'm silly but I find :append with += safer to do than manually remembring
> > to add the space character.
> 
> I tend to agree; hence why I wrote it that way in the original patch. 
> But I'm not going to defend the practice in this case, so ACK from me 
> either way.

There is a patch on the bitbake list which would make this usage a warning. It
certainly isn't obvious to most new users that:

YYY:append += "XXX"

really means

YYY:append = " XXX"

so I tend to prefer the later as being much clearer about what is happening.
Part of what we need to to improve usability is to remove some of these
confusions so standardising on things like this seems to make sense.

> I'm intending to drop this recipe warning after the opkg_0.5.0 release 
> in December. So the recipe-as-written will only exist in the mainline 
> for another few months.

Sounds good.

Cheers,

Richard





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

end of thread, other threads:[~2021-11-04 23:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 14:02 [PATCH] opkg: Fix poor operator combination choice Richard Purdie
2021-11-04 14:35 ` [OE-core] " Mikko.Rapeli
2021-11-04 22:05   ` Alex Stewart
2021-11-04 23:05     ` Richard Purdie

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.