Re: [OE-core] [PATCH] opkg: Fix poor operator combination choice

2021-11-04 Thread Richard Purdie
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 +, 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




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157878): 
https://lists.openembedded.org/g/openembedded-core/message/157878
Mute This Topic: https://lists.openembedded.org/mt/86816265/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] opkg: Fix poor operator combination choice

2021-11-04 Thread Alex Stewart


On 11/4/21 09:35, Mikko Rapeli wrote:

On Thu, Nov 04, 2021 at 02:02:57PM +, 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 
---
  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.stew...@ni.com


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157877): 
https://lists.openembedded.org/g/openembedded-core/message/157877
Mute This Topic: https://lists.openembedded.org/mt/86816265/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] opkg: Fix poor operator combination choice

2021-11-04 Thread Mikko Rapeli
On Thu, Nov 04, 2021 at 02:02:57PM +, 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 
> ---
>  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 (#157849): 
https://lists.openembedded.org/g/openembedded-core/message/157849
Mute This Topic: https://lists.openembedded.org/mt/86816265/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] opkg: Fix poor operator combination choice

2021-11-04 Thread Richard Purdie
Combining :append with += rarely makes sense. Improve it to use the standard
format (and tweak the implied spacing).

Signed-off-by: Richard Purdie 
---
 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/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-